/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    cn-hangzhou = 'linkedmall.aliyuncs.com',
    cn-shanghai = 'linkedmall.aliyuncs.com',
    ap-northeast-1 = 'linkedmall.aliyuncs.com',
    ap-northeast-2-pop = 'linkedmall.aliyuncs.com',
    ap-south-1 = 'linkedmall.aliyuncs.com',
    ap-southeast-1 = 'linkedmall.aliyuncs.com',
    ap-southeast-2 = 'linkedmall.aliyuncs.com',
    ap-southeast-3 = 'linkedmall.aliyuncs.com',
    ap-southeast-5 = 'linkedmall.aliyuncs.com',
    cn-beijing = 'linkedmall.aliyuncs.com',
    cn-beijing-finance-1 = 'linkedmall.aliyuncs.com',
    cn-beijing-finance-pop = 'linkedmall.aliyuncs.com',
    cn-beijing-gov-1 = 'linkedmall.aliyuncs.com',
    cn-beijing-nu16-b01 = 'linkedmall.aliyuncs.com',
    cn-chengdu = 'linkedmall.aliyuncs.com',
    cn-edge-1 = 'linkedmall.aliyuncs.com',
    cn-fujian = 'linkedmall.aliyuncs.com',
    cn-haidian-cm12-c01 = 'linkedmall.aliyuncs.com',
    cn-hangzhou-bj-b01 = 'linkedmall.aliyuncs.com',
    cn-hangzhou-finance = 'linkedmall.aliyuncs.com',
    cn-hangzhou-internal-prod-1 = 'linkedmall.aliyuncs.com',
    cn-hangzhou-internal-test-1 = 'linkedmall.aliyuncs.com',
    cn-hangzhou-internal-test-2 = 'linkedmall.aliyuncs.com',
    cn-hangzhou-internal-test-3 = 'linkedmall.aliyuncs.com',
    cn-hangzhou-test-306 = 'linkedmall.aliyuncs.com',
    cn-hongkong = 'linkedmall.aliyuncs.com',
    cn-hongkong-finance-pop = 'linkedmall.aliyuncs.com',
    cn-huhehaote = 'linkedmall.aliyuncs.com',
    cn-north-2-gov-1 = 'linkedmall.aliyuncs.com',
    cn-qingdao = 'linkedmall.aliyuncs.com',
    cn-qingdao-nebula = 'linkedmall.aliyuncs.com',
    cn-shanghai-et15-b01 = 'linkedmall.aliyuncs.com',
    cn-shanghai-et2-b01 = 'linkedmall.aliyuncs.com',
    cn-shanghai-finance-1 = 'linkedmall.aliyuncs.com',
    cn-shanghai-inner = 'linkedmall.aliyuncs.com',
    cn-shanghai-internal-test-1 = 'linkedmall.aliyuncs.com',
    cn-shenzhen = 'linkedmall.aliyuncs.com',
    cn-shenzhen-finance-1 = 'linkedmall.aliyuncs.com',
    cn-shenzhen-inner = 'linkedmall.aliyuncs.com',
    cn-shenzhen-st4-d01 = 'linkedmall.aliyuncs.com',
    cn-shenzhen-su18-b01 = 'linkedmall.aliyuncs.com',
    cn-wuhan = 'linkedmall.aliyuncs.com',
    cn-yushanfang = 'linkedmall.aliyuncs.com',
    cn-zhangbei-na61-b01 = 'linkedmall.aliyuncs.com',
    cn-zhangjiakou = 'linkedmall.aliyuncs.com',
    cn-zhangjiakou-na62-a01 = 'linkedmall.aliyuncs.com',
    cn-zhengzhou-nebula-1 = 'linkedmall.aliyuncs.com',
    eu-central-1 = 'linkedmall.aliyuncs.com',
    eu-west-1 = 'linkedmall.aliyuncs.com',
    eu-west-1-oxs = 'linkedmall.aliyuncs.com',
    me-east-1 = 'linkedmall.aliyuncs.com',
    rus-west-1-pop = 'linkedmall.aliyuncs.com',
    us-east-1 = 'linkedmall.aliyuncs.com',
    us-west-1 = 'linkedmall.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('linkedmall', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddAddressRequest {
  addressInfo?: string(name='AddressInfo', description='This parameter is required.'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL202202100002'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model AddAddressResponseBody = {
  addressId?: long(name='AddressId', example='560100452'),
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
}

model AddAddressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddAddressResponseBody(name='body'),
}

/**
 * @param request AddAddressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddAddressResponse
 */
async function addAddressWithOptions(request: AddAddressRequest, runtime: Util.RuntimeOptions): AddAddressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.addressInfo)) {
    body['AddressInfo'] = request.addressInfo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddAddress',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request AddAddressRequest
 * @return AddAddressResponse
 */
async function addAddress(request: AddAddressRequest): AddAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAddressWithOptions(request, runtime);
}

model AddItemLimitRuleRequest {
  beginTime?: long(name='BeginTime', description='This parameter is required.', example='1638958044395'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  endTime?: long(name='EndTime', description='This parameter is required.', example='1647446400000'),
  itemId?: long(name='ItemId', example='59******0266'),
  lmActivityId?: long(name='LmActivityId', example='679'),
  lmItemId?: string(name='LmItemId', example='10000055-******09769'),
  ruleType?: int32(name='RuleType', description='This parameter is required.'),
  subBizCode?: string(name='SubBizCode', example='eaab4******59205ec608b2144ba'),
  upperNum?: int32(name='UpperNum', description='This parameter is required.'),
}

model AddItemLimitRuleResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: long(name='Model', example='1'),
  requestId?: string(name='RequestId', example='7BAC5B75-8208-5788-829D-AD7640085D38'),
  ruleId?: long(name='RuleId', example='109'),
}

model AddItemLimitRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddItemLimitRuleResponseBody(name='body'),
}

/**
 * @param request AddItemLimitRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddItemLimitRuleResponse
 */
async function addItemLimitRuleWithOptions(request: AddItemLimitRuleRequest, runtime: Util.RuntimeOptions): AddItemLimitRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.beginTime)) {
    query['BeginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmActivityId)) {
    query['LmActivityId'] = request.lmActivityId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.ruleType)) {
    query['RuleType'] = request.ruleType;
  }
  if (!Util.isUnset(request.subBizCode)) {
    query['SubBizCode'] = request.subBizCode;
  }
  if (!Util.isUnset(request.upperNum)) {
    query['UpperNum'] = request.upperNum;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddItemLimitRule',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request AddItemLimitRuleRequest
 * @return AddItemLimitRuleResponse
 */
async function addItemLimitRule(request: AddItemLimitRuleRequest): AddItemLimitRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return addItemLimitRuleWithOptions(request, runtime);
}

model AddItemToSubBizsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20190325****'),
  itemId?: long(name='ItemId', example='57835029****'),
  lmItemId?: string(name='LmItemId', example='10001036-66644894****'),
  subBizIds?: map[string]any(name='SubBizIds', example='["id1", "id2"]'),
}

model AddItemToSubBizsShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20190325****'),
  itemId?: long(name='ItemId', example='57835029****'),
  lmItemId?: string(name='LmItemId', example='10001036-66644894****'),
  subBizIdsShrink?: string(name='SubBizIds', example='["id1", "id2"]'),
}

model AddItemToSubBizsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='A7BE4356-7F92-533E-A31B-2EBF2D67****'),
}

model AddItemToSubBizsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddItemToSubBizsResponseBody(name='body'),
}

/**
 * @param tmpReq AddItemToSubBizsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddItemToSubBizsResponse
 */
async function addItemToSubBizsWithOptions(tmpReq: AddItemToSubBizsRequest, runtime: Util.RuntimeOptions): AddItemToSubBizsResponse {
  Util.validateModel(tmpReq);
  var request = new AddItemToSubBizsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.subBizIds)) {
    request.subBizIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.subBizIds, 'SubBizIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.itemId)) {
    body['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    body['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.subBizIdsShrink)) {
    body['SubBizIds'] = request.subBizIdsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddItemToSubBizs',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request AddItemToSubBizsRequest
 * @return AddItemToSubBizsResponse
 */
async function addItemToSubBizs(request: AddItemToSubBizsRequest): AddItemToSubBizsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addItemToSubBizsWithOptions(request, runtime);
}

model AddSupplierNewItemsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2000***12'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='61936646****'),
      lmItemId?: string(name='LmItemId', example='10000035-61936646****'),
      skuList?: [ long ](name='SkuList'),
    }
  ](name='ItemList'),
}

model AddSupplierNewItemsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='F2D3CA1E-28BE-5E1C-B55F-81C8F290****'),
}

model AddSupplierNewItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddSupplierNewItemsResponseBody(name='body'),
}

/**
 * @param request AddSupplierNewItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddSupplierNewItemsResponse
 */
async function addSupplierNewItemsWithOptions(request: AddSupplierNewItemsRequest, runtime: Util.RuntimeOptions): AddSupplierNewItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.itemList)) {
    query['ItemList'] = request.itemList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddSupplierNewItems',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request AddSupplierNewItemsRequest
 * @return AddSupplierNewItemsResponse
 */
async function addSupplierNewItems(request: AddSupplierNewItemsRequest): AddSupplierNewItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addSupplierNewItemsWithOptions(request, runtime);
}

model ApplyRefundRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  applyReasonTextId?: long(name='ApplyReasonTextId', example='500325'),
  applyRefundCount?: int32(name='ApplyRefundCount', example='1'),
  applyRefundFee?: long(name='ApplyRefundFee', description='This parameter is required.', example='790'),
  bizClaimType?: int32(name='BizClaimType', description='This parameter is required.', example='1'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL201912230007'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='186******89'),
  goodsStatus?: int32(name='GoodsStatus', example='4'),
  leaveMessage?: string(name='LeaveMessage'),
  leavePictureList?: [ 
    {
      desc?: string(name='Desc'),
      picture?: string(name='Picture', example='https://lm-dk.oss-cn-hangzhou.aliyuncs.com/******06661.png'),
    }
  ](name='LeavePictureList'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='42******33'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model ApplyRefundResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  refundApplicationData?: {
    disputeId?: long(name='DisputeId'),
    disputeStatus?: int32(name='DisputeStatus', example='1'),
    disputeType?: int32(name='DisputeType', example='0'),
    subLmOrderId?: string(name='SubLmOrderId', example='53******67'),
  }(name='RefundApplicationData'),
  requestId?: string(name='RequestId', example='5F0A38D5-F981-529A-911E-1B6D55DE568C'),
}

model ApplyRefundResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ApplyRefundResponseBody(name='body'),
}

/**
 * @summary 退款申请
 *
 * @param request ApplyRefundRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ApplyRefundResponse
 */
async function applyRefundWithOptions(request: ApplyRefundRequest, runtime: Util.RuntimeOptions): ApplyRefundResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.applyReasonTextId)) {
    query['ApplyReasonTextId'] = request.applyReasonTextId;
  }
  if (!Util.isUnset(request.applyRefundCount)) {
    query['ApplyRefundCount'] = request.applyRefundCount;
  }
  if (!Util.isUnset(request.applyRefundFee)) {
    query['ApplyRefundFee'] = request.applyRefundFee;
  }
  if (!Util.isUnset(request.bizClaimType)) {
    query['BizClaimType'] = request.bizClaimType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.goodsStatus)) {
    query['GoodsStatus'] = request.goodsStatus;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    query['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.leaveMessage)) {
    body['LeaveMessage'] = request.leaveMessage;
  }
  if (!Util.isUnset(request.leavePictureList)) {
    body['LeavePictureList'] = request.leavePictureList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ApplyRefund',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 退款申请
 *
 * @param request ApplyRefundRequest
 * @return ApplyRefundResponse
 */
async function applyRefund(request: ApplyRefundRequest): ApplyRefundResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyRefundWithOptions(request, runtime);
}

model ApplyRefundWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20***001'),
  disputeId?: long(name='DisputeId', example='142***071'),
  goodsStatus?: int32(name='GoodsStatus', description='This parameter is required.', example='2'),
  message?: string(name='Message'),
  proofs?: [ 
    {
      messagePic?: string(name='MessagePic', example='https://aliyundoc.com'),
      messagePicDesc?: string(name='MessagePicDesc'),
    }
  ](name='Proofs'),
  reasonId?: long(name='ReasonId', description='This parameter is required.', example='150013'),
  refundCode?: int32(name='RefundCode', description='This parameter is required.', example='3'),
  refundCount?: int32(name='RefundCount', example='1'),
  refundFee?: long(name='RefundFee', description='This parameter is required.', example='990'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='702091003'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='333***21'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='U333***21'),
}

model ApplyRefundWithDesignatedTbUidShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20***001'),
  disputeId?: long(name='DisputeId', example='142***071'),
  goodsStatus?: int32(name='GoodsStatus', description='This parameter is required.', example='2'),
  message?: string(name='Message'),
  proofsShrink?: string(name='Proofs'),
  reasonId?: long(name='ReasonId', description='This parameter is required.', example='150013'),
  refundCode?: int32(name='RefundCode', description='This parameter is required.', example='3'),
  refundCount?: int32(name='RefundCount', example='1'),
  refundFee?: long(name='RefundFee', description='This parameter is required.', example='990'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='702091003'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='333***21'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='U333***21'),
}

model ApplyRefundWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    disputeId?: long(name='DisputeId', example='155***050'),
    disputeStatus?: int32(name='DisputeStatus', example='1'),
    disputeType?: int32(name='DisputeType', example='1'),
    subLmOrderId?: string(name='SubLmOrderId', example='689***932'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='6DC726F1-65***14-5C30B4B6508C'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='5'),
}

model ApplyRefundWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ApplyRefundWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param tmpReq ApplyRefundWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ApplyRefundWithDesignatedTbUidResponse
 */
async function applyRefundWithDesignatedTbUidWithOptions(tmpReq: ApplyRefundWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): ApplyRefundWithDesignatedTbUidResponse {
  Util.validateModel(tmpReq);
  var request = new ApplyRefundWithDesignatedTbUidShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.proofs)) {
    request.proofsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.proofs, 'Proofs', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.disputeId)) {
    body['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.goodsStatus)) {
    body['GoodsStatus'] = request.goodsStatus;
  }
  if (!Util.isUnset(request.message)) {
    body['Message'] = request.message;
  }
  if (!Util.isUnset(request.proofsShrink)) {
    body['Proofs'] = request.proofsShrink;
  }
  if (!Util.isUnset(request.reasonId)) {
    body['ReasonId'] = request.reasonId;
  }
  if (!Util.isUnset(request.refundCode)) {
    body['RefundCode'] = request.refundCode;
  }
  if (!Util.isUnset(request.refundCount)) {
    body['RefundCount'] = request.refundCount;
  }
  if (!Util.isUnset(request.refundFee)) {
    body['RefundFee'] = request.refundFee;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    body['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ApplyRefundWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ApplyRefundWithDesignatedTbUidRequest
 * @return ApplyRefundWithDesignatedTbUidResponse
 */
async function applyRefundWithDesignatedTbUid(request: ApplyRefundWithDesignatedTbUidRequest): ApplyRefundWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return applyRefundWithDesignatedTbUidWithOptions(request, runtime);
}

model BatchRegistAnonymousTbAccountRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210802****'),
  idJsonList?: string(name='IdJsonList', description='This parameter is required.', example='idJsonList": "[\\\\"id1\\\\", \\\\"id2\\\\"]'),
}

model BatchRegistAnonymousTbAccountResponseBody = {
  batchId?: string(name='BatchId', example='[\\\\"id1\\\\", \\\\"id2\\\\"]'),
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='37899973-5963-5028-BA54-180A5B107****'),
}

model BatchRegistAnonymousTbAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchRegistAnonymousTbAccountResponseBody(name='body'),
}

/**
 * @param request BatchRegistAnonymousTbAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchRegistAnonymousTbAccountResponse
 */
async function batchRegistAnonymousTbAccountWithOptions(request: BatchRegistAnonymousTbAccountRequest, runtime: Util.RuntimeOptions): BatchRegistAnonymousTbAccountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.idJsonList)) {
    query['IdJsonList'] = request.idJsonList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'BatchRegistAnonymousTbAccount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request BatchRegistAnonymousTbAccountRequest
 * @return BatchRegistAnonymousTbAccountResponse
 */
async function batchRegistAnonymousTbAccount(request: BatchRegistAnonymousTbAccountRequest): BatchRegistAnonymousTbAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchRegistAnonymousTbAccountWithOptions(request, runtime);
}

model CancelOrderRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210802****'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='208861290576****'),
  lmOrderId?: string(name='LmOrderId', description='This parameter is required.', example='46992****'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='207761290576****'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model CancelOrderResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='920C6519-4888-599F-9FBA-991774BAA1DD'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='True'),
}

model CancelOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelOrderResponseBody(name='body'),
}

/**
 * @param request CancelOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelOrderResponse
 */
async function cancelOrderWithOptions(request: CancelOrderRequest, runtime: Util.RuntimeOptions): CancelOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CancelOrder',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CancelOrderRequest
 * @return CancelOrderResponse
 */
async function cancelOrder(request: CancelOrderRequest): CancelOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelOrderWithOptions(request, runtime);
}

model CancelOrderWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20***001'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.', example='449***059'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='232***124'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='u***001'),
}

model CancelOrderWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: map[string]any(name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='1'),
  requestId?: string(name='RequestId', example='79C01D47-3***9-1B33F7ED'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='""'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model CancelOrderWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelOrderWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request CancelOrderWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelOrderWithDesignatedTbUidResponse
 */
async function cancelOrderWithDesignatedTbUidWithOptions(request: CancelOrderWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): CancelOrderWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    body['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CancelOrderWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CancelOrderWithDesignatedTbUidRequest
 * @return CancelOrderWithDesignatedTbUidResponse
 */
async function cancelOrderWithDesignatedTbUid(request: CancelOrderWithDesignatedTbUidRequest): CancelOrderWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelOrderWithDesignatedTbUidWithOptions(request, runtime);
}

model CancelRealTbAccountSupportRequest {
  bizId?: string(name='BizId', description='This parameter is required.'),
}

model CancelRealTbAccountSupportResponseBody = {
  code?: string(name='Code'),
  logsId?: string(name='LogsId'),
  message?: string(name='Message'),
  model?: any(name='Model'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  subCode?: string(name='SubCode'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success'),
  totalCount?: long(name='TotalCount'),
}

model CancelRealTbAccountSupportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelRealTbAccountSupportResponseBody(name='body'),
}

/**
 * @param request CancelRealTbAccountSupportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelRealTbAccountSupportResponse
 */
async function cancelRealTbAccountSupportWithOptions(request: CancelRealTbAccountSupportRequest, runtime: Util.RuntimeOptions): CancelRealTbAccountSupportResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CancelRealTbAccountSupport',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CancelRealTbAccountSupportRequest
 * @return CancelRealTbAccountSupportResponse
 */
async function cancelRealTbAccountSupport(request: CancelRealTbAccountSupportRequest): CancelRealTbAccountSupportResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelRealTbAccountSupportWithOptions(request, runtime);
}

model CancelRefundRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='22******2303'),
  disputeId?: long(name='DisputeId', description='This parameter is required.', example='14244******33071'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='52******93'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model CancelRefundResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  refundApplicationData?: {
    disputeStatus?: int32(name='DisputeStatus', example='1'),
    disputeType?: int32(name='DisputeType', example='0'),
    subLmOrderId?: string(name='SubLmOrderId', example='37******31'),
  }(name='RefundApplicationData'),
  requestId?: string(name='RequestId', example='5E2D59BA-4EB0-45C4-A0D7-D98C1A4B320B'),
}

model CancelRefundResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelRefundResponseBody(name='body'),
}

/**
 * @param request CancelRefundRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelRefundResponse
 */
async function cancelRefundWithOptions(request: CancelRefundRequest, runtime: Util.RuntimeOptions): CancelRefundResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.disputeId)) {
    query['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    query['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CancelRefund',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CancelRefundRequest
 * @return CancelRefundResponse
 */
async function cancelRefund(request: CancelRefundRequest): CancelRefundResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelRefundWithOptions(request, runtime);
}

model CancelRefundWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20***001'),
  disputeId?: long(name='DisputeId', description='This parameter is required.', example='1108***5380'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='709***761'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='2132***312'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='U0324***21'),
}

model CancelRefundWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: any(name='Model', example='null'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='DF449356-35***B-21D37079E96A'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='""'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model CancelRefundWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelRefundWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request CancelRefundWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelRefundWithDesignatedTbUidResponse
 */
async function cancelRefundWithDesignatedTbUidWithOptions(request: CancelRefundWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): CancelRefundWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.disputeId)) {
    body['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    body['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CancelRefundWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CancelRefundWithDesignatedTbUidRequest
 * @return CancelRefundWithDesignatedTbUidResponse
 */
async function cancelRefundWithDesignatedTbUid(request: CancelRefundWithDesignatedTbUidRequest): CancelRefundWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelRefundWithDesignatedTbUidWithOptions(request, runtime);
}

model ConfirmDisburseRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******01'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='9f99f38030254728***'),
  lmOrderId?: string(name='LmOrderId', description='This parameter is required.', example='449975059**'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='2'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='false'),
}

model ConfirmDisburseResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
}

model ConfirmDisburseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ConfirmDisburseResponseBody(name='body'),
}

/**
 * @param request ConfirmDisburseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ConfirmDisburseResponse
 */
async function confirmDisburseWithOptions(request: ConfirmDisburseRequest, runtime: Util.RuntimeOptions): ConfirmDisburseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ConfirmDisburse',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ConfirmDisburseRequest
 * @return ConfirmDisburseResponse
 */
async function confirmDisburse(request: ConfirmDisburseRequest): ConfirmDisburseResponse {
  var runtime = new Util.RuntimeOptions{};
  return confirmDisburseWithOptions(request, runtime);
}

model ConfirmDisburseWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2022...03'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.', example='7068...44'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='2131**111'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='user***002'),
}

model ConfirmDisburseWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: any(name='Model', example='null'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='23BBD746-A6A9-55D5-A9B5-14019901445C'),
  subCode?: string(name='SubCode', example='""'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model ConfirmDisburseWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ConfirmDisburseWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request ConfirmDisburseWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ConfirmDisburseWithDesignatedTbUidResponse
 */
async function confirmDisburseWithDesignatedTbUidWithOptions(request: ConfirmDisburseWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): ConfirmDisburseWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    body['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ConfirmDisburseWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ConfirmDisburseWithDesignatedTbUidRequest
 * @return ConfirmDisburseWithDesignatedTbUidResponse
 */
async function confirmDisburseWithDesignatedTbUid(request: ConfirmDisburseWithDesignatedTbUidRequest): ConfirmDisburseWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return confirmDisburseWithDesignatedTbUidWithOptions(request, runtime);
}

model CreateOrderRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20201229****'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='221249435****'),
  buyerMessageMap?: string(name='BuyerMessageMap'),
  deliveryAddress?: string(name='DeliveryAddress'),
  extJson?: string(name='ExtJson', example='{}'),
  itemId?: long(name='ItemId', example='57835029****'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='64750262****'),
      lmItemId?: string(name='LmItemId', example='10000035-61936646****'),
      quantity?: int32(name='Quantity', example='10'),
      skuId?: long(name='SkuId', example='456458315****'),
    }
  ](name='ItemList'),
  lmItemId?: string(name='LmItemId', example='10000035-6193664*****'),
  orderExpireTime?: long(name='OrderExpireTime', example='900000'),
  outTradeId?: string(name='OutTradeId', description='This parameter is required.', example='14684075319554*****'),
  quantity?: long(name='Quantity', example='100'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='susan*******'),
  totalAmount?: long(name='TotalAmount', example='4990'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model CreateOrderResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='RESULT_STATUS_UNKOWN'),
  model?: {
    lmOrderList?: {
      lmOrderList?: [ 
      {
        lmOrderId?: string(name='LmOrderId', example='39435****'),
      }
    ](name='LmOrderList')
    }(name='LmOrderList'),
    orderIds?: {
      orderIds?: [ string ](name='OrderIds')
    }(name='OrderIds'),
    payTradeIds?: {
      payTradeIds?: [ string ](name='PayTradeIds')
    }(name='PayTradeIds'),
    redirectUrl?: string(name='RedirectUrl', example='"www.taoba**.com"'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='DA2554FD-F21F-536F-A7B7-B96C3E5F****'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model CreateOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateOrderResponseBody(name='body'),
}

/**
 * @param request CreateOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateOrderResponse
 */
async function createOrderWithOptions(request: CreateOrderRequest, runtime: Util.RuntimeOptions): CreateOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.buyerMessageMap)) {
    query['BuyerMessageMap'] = request.buyerMessageMap;
  }
  if (!Util.isUnset(request.deliveryAddress)) {
    query['DeliveryAddress'] = request.deliveryAddress;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.itemList)) {
    query['ItemList'] = request.itemList;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.orderExpireTime)) {
    query['OrderExpireTime'] = request.orderExpireTime;
  }
  if (!Util.isUnset(request.outTradeId)) {
    query['OutTradeId'] = request.outTradeId;
  }
  if (!Util.isUnset(request.quantity)) {
    query['Quantity'] = request.quantity;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.totalAmount)) {
    query['TotalAmount'] = request.totalAmount;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateOrder',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateOrderRequest
 * @return CreateOrderResponse
 */
async function createOrder(request: CreateOrderRequest): CreateOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return createOrderWithOptions(request, runtime);
}

model CreateOrderPayUrlForOutDiscountRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20****201229'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='20882****3220453'),
  buyInfo?: string(name='BuyInfo', description='This parameter is required.', example='{"addressId":"158*****11","deliveryInfoId":"20","extJson":{"subBizCode":"defaultSubBizCode"},"orderItems":[{"lmItemId":"1002****123-67150****12","number":1,"outDiscountFee":"0","price":"1","skuId":4830321*****}],"outDiscountInfos":{"promotionInfos":[],"totalDiscountFee":"0"},"postFee":0,"serviceType":-4}'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='2088****23220453'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model CreateOrderPayUrlForOutDiscountResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    allIdsMap?: map[string]object(name='AllIdsMap'),
    lmOrderList?: [ string ](name='LmOrderList'),
    orderIds?: [ string ](name='OrderIds'),
    payTradeIds?: [ string ](name='PayTradeIds'),
    redirectUrl?: string(name='RedirectUrl', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D08E8'),
  success?: boolean(name='Success', example='true'),
}

model CreateOrderPayUrlForOutDiscountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateOrderPayUrlForOutDiscountResponseBody(name='body'),
}

/**
 * @summary 支持外部传入优惠下单接口
 *
 * @param request CreateOrderPayUrlForOutDiscountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateOrderPayUrlForOutDiscountResponse
 */
async function createOrderPayUrlForOutDiscountWithOptions(request: CreateOrderPayUrlForOutDiscountRequest, runtime: Util.RuntimeOptions): CreateOrderPayUrlForOutDiscountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.buyInfo)) {
    body['BuyInfo'] = request.buyInfo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateOrderPayUrlForOutDiscount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 支持外部传入优惠下单接口
 *
 * @param request CreateOrderPayUrlForOutDiscountRequest
 * @return CreateOrderPayUrlForOutDiscountResponse
 */
async function createOrderPayUrlForOutDiscount(request: CreateOrderPayUrlForOutDiscountRequest): CreateOrderPayUrlForOutDiscountResponse {
  var runtime = new Util.RuntimeOptions{};
  return createOrderPayUrlForOutDiscountWithOptions(request, runtime);
}

model CreateOrderTransactionDetailFileRequest {
  bizId?: string(name='BizId', example='LMALL20211102****'),
  bizName?: string(name='BizName', example='click_page'),
  channelName?: string(name='ChannelName', example='tcp_v'),
  createEndTime?: string(name='CreateEndTime', example='2021-12-31 14:03:28'),
  createStartTime?: string(name='CreateStartTime', example='2021-02-26 04:55:31'),
  itemId?: string(name='ItemId', example='655******148'),
  lmShopId?: string(name='LmShopId', example='10026953'),
  orderStatus?: string(name='OrderStatus', example='6'),
  payStatus?: string(name='PayStatus', example='2'),
  paymentEndTime?: string(name='PaymentEndTime', example='2021-12-31 14:03:28'),
  paymentStartTime?: string(name='PaymentStartTime', example='2021-12-31 14:03:28'),
  poCode?: string(name='PoCode'),
  refundEndTime?: string(name='RefundEndTime', example='2021-12-31 14:05:21'),
  refundStartTime?: string(name='RefundStartTime', example='2021-12-31 14:03:28'),
  sellerId?: string(name='SellerId', example='220680193****'),
  sellerName?: string(name='SellerName'),
  settlementNode?: string(name='SettlementNode'),
  shopName?: string(name='ShopName', example='hyq-1'),
  tbMainOrderId?: string(name='TbMainOrderId', example='201312321321312'),
  tenantId?: string(name='TenantId', example='18******263'),
  tenantName?: string(name='TenantName', example='NYBQJYWZ'),
}

model CreateOrderTransactionDetailFileResponseBody = {
  bizViewData?: map[string]any(name='BizViewData'),
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  recordId?: string(name='RecordId', example='ORDER-92d3f9b1afa04172ac27710706fd398f'),
  requestId?: string(name='RequestId', example='E090F1A0-7454-5F36-933C-E6332CE2****'),
  subCode?: string(name='SubCode', example='1004'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model CreateOrderTransactionDetailFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateOrderTransactionDetailFileResponseBody(name='body'),
}

/**
 * @summary 生成订单交易明细文件
 *
 * @param request CreateOrderTransactionDetailFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateOrderTransactionDetailFileResponse
 */
async function createOrderTransactionDetailFileWithOptions(request: CreateOrderTransactionDetailFileRequest, runtime: Util.RuntimeOptions): CreateOrderTransactionDetailFileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizName)) {
    body['BizName'] = request.bizName;
  }
  if (!Util.isUnset(request.channelName)) {
    body['ChannelName'] = request.channelName;
  }
  if (!Util.isUnset(request.createEndTime)) {
    body['CreateEndTime'] = request.createEndTime;
  }
  if (!Util.isUnset(request.createStartTime)) {
    body['CreateStartTime'] = request.createStartTime;
  }
  if (!Util.isUnset(request.itemId)) {
    body['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmShopId)) {
    body['LmShopId'] = request.lmShopId;
  }
  if (!Util.isUnset(request.orderStatus)) {
    body['OrderStatus'] = request.orderStatus;
  }
  if (!Util.isUnset(request.payStatus)) {
    body['PayStatus'] = request.payStatus;
  }
  if (!Util.isUnset(request.paymentEndTime)) {
    body['PaymentEndTime'] = request.paymentEndTime;
  }
  if (!Util.isUnset(request.paymentStartTime)) {
    body['PaymentStartTime'] = request.paymentStartTime;
  }
  if (!Util.isUnset(request.poCode)) {
    body['PoCode'] = request.poCode;
  }
  if (!Util.isUnset(request.refundEndTime)) {
    body['RefundEndTime'] = request.refundEndTime;
  }
  if (!Util.isUnset(request.refundStartTime)) {
    body['RefundStartTime'] = request.refundStartTime;
  }
  if (!Util.isUnset(request.sellerId)) {
    body['SellerId'] = request.sellerId;
  }
  if (!Util.isUnset(request.sellerName)) {
    body['SellerName'] = request.sellerName;
  }
  if (!Util.isUnset(request.settlementNode)) {
    body['SettlementNode'] = request.settlementNode;
  }
  if (!Util.isUnset(request.shopName)) {
    body['ShopName'] = request.shopName;
  }
  if (!Util.isUnset(request.tbMainOrderId)) {
    body['TbMainOrderId'] = request.tbMainOrderId;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  if (!Util.isUnset(request.tenantName)) {
    body['TenantName'] = request.tenantName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateOrderTransactionDetailFile',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 生成订单交易明细文件
 *
 * @param request CreateOrderTransactionDetailFileRequest
 * @return CreateOrderTransactionDetailFileResponse
 */
async function createOrderTransactionDetailFile(request: CreateOrderTransactionDetailFileRequest): CreateOrderTransactionDetailFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return createOrderTransactionDetailFileWithOptions(request, runtime);
}

model CreateOrderV2Request {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL202****0001'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='4012776630'),
  buyerMessageMap?: string(name='BuyerMessageMap'),
  deliveryAddress?: string(name='DeliveryAddress', example='*****************************************************************************************************'),
  extJson?: string(name='ExtJson', example='{\\\\"outShopId\\\\":\\\\"8044468\\\\"}'),
  itemId?: long(name='ItemId', example='591831917868'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='649442334167'),
      lmItemId?: string(name='LmItemId', example='10000102-630119724405'),
      quantity?: int32(name='Quantity', example='5'),
      skuId?: long(name='SkuId', example='4586054386257'),
    }
  ](name='ItemList'),
  lmItemId?: string(name='LmItemId', example='10016572-654408058233'),
  orderExpireTime?: long(name='OrderExpireTime', example='3600'),
  outTradeId?: string(name='OutTradeId', description='This parameter is required.', example='949251510338846720'),
  quantity?: long(name='Quantity', example='1'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='1'),
  totalAmount?: long(name='TotalAmount', example='1'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model CreateOrderV2ResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    lmOrderList?: {
      lmOrderList?: [ 
      {
        lmOrderId?: string(name='LmOrderId', example='[5748****,5647****]'),
      }
    ](name='LmOrderList')
    }(name='LmOrderList'),
    orderIds?: {
      orderIds?: [ string ](name='OrderIds')
    }(name='OrderIds'),
    payTradeIds?: {
      payTradeIds?: [ string ](name='PayTradeIds')
    }(name='PayTradeIds'),
    redirectUrl?: string(name='RedirectUrl', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='978A8742-1A38-54B5-98D9-F8713ACBC385'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='True'),
  totalCount?: long(name='TotalCount', example='7'),
}

model CreateOrderV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateOrderV2ResponseBody(name='body'),
}

/**
 * @param request CreateOrderV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateOrderV2Response
 */
async function createOrderV2WithOptions(request: CreateOrderV2Request, runtime: Util.RuntimeOptions): CreateOrderV2Response {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.buyerMessageMap)) {
    query['BuyerMessageMap'] = request.buyerMessageMap;
  }
  if (!Util.isUnset(request.deliveryAddress)) {
    query['DeliveryAddress'] = request.deliveryAddress;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.itemList)) {
    query['ItemList'] = request.itemList;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.orderExpireTime)) {
    query['OrderExpireTime'] = request.orderExpireTime;
  }
  if (!Util.isUnset(request.outTradeId)) {
    query['OutTradeId'] = request.outTradeId;
  }
  if (!Util.isUnset(request.quantity)) {
    query['Quantity'] = request.quantity;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.totalAmount)) {
    query['TotalAmount'] = request.totalAmount;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateOrderV2',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateOrderV2Request
 * @return CreateOrderV2Response
 */
async function createOrderV2(request: CreateOrderV2Request): CreateOrderV2Response {
  var runtime = new Util.RuntimeOptions{};
  return createOrderV2WithOptions(request, runtime);
}

model CreateOrderWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******05'),
  buyerMessages?: string(name='BuyerMessages', example='""'),
  deliveryAddress?: string(name='DeliveryAddress', description='This parameter is required.'),
  deliveryInfo?: string(name='DeliveryInfo', example='{ \\\\"serviceType\\\\": -4,\\\\"id\\\\": \\\\"20\\\\", \\\\"postFee\\\\": 0}'),
  extInfo?: string(name='ExtInfo', example='{}'),
  orderExpireTime?: long(name='OrderExpireTime', example='3600'),
  orderItems?: string(name='OrderItems', description='This parameter is required.', example='[{\\\\"lmItemId\\\\":\\\\"10028102-655199865844\\\\",\\\\"number\\\\":1,\\\\"skuId\\\\": 4900752886354}]'),
  outTradeId?: string(name='OutTradeId', example='146******54'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='677******211'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='321******211'),
}

model CreateOrderWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    allIdsMap?: map[string]object(name='AllIdsMap'),
    app?: string(name='App', example='linkedmall-platform'),
    lmOrderIds?: [ string ](name='LmOrderIds'),
    orderIds?: [ string ](name='OrderIds'),
    payTradeIds?: [ string ](name='PayTradeIds'),
    redirectUrl?: string(name='RedirectUrl', example='https://aliyundoc.com'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='75F3A591-B1A6-5EFF-8ABF-35AB8804DFA0'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='""'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model CreateOrderWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateOrderWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request CreateOrderWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateOrderWithDesignatedTbUidResponse
 */
async function createOrderWithDesignatedTbUidWithOptions(request: CreateOrderWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): CreateOrderWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.buyerMessages)) {
    body['BuyerMessages'] = request.buyerMessages;
  }
  if (!Util.isUnset(request.deliveryAddress)) {
    body['DeliveryAddress'] = request.deliveryAddress;
  }
  if (!Util.isUnset(request.deliveryInfo)) {
    body['DeliveryInfo'] = request.deliveryInfo;
  }
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.orderExpireTime)) {
    body['OrderExpireTime'] = request.orderExpireTime;
  }
  if (!Util.isUnset(request.orderItems)) {
    body['OrderItems'] = request.orderItems;
  }
  if (!Util.isUnset(request.outTradeId)) {
    body['OutTradeId'] = request.outTradeId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateOrderWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateOrderWithDesignatedTbUidRequest
 * @return CreateOrderWithDesignatedTbUidResponse
 */
async function createOrderWithDesignatedTbUid(request: CreateOrderWithDesignatedTbUidRequest): CreateOrderWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return createOrderWithDesignatedTbUidWithOptions(request, runtime);
}

model CreateOutDiscountOrderWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2022***01'),
  buyerMessages?: string(name='BuyerMessages', example='""'),
  deliveryAddress?: string(name='DeliveryAddress', description='This parameter is required.'),
  deliveryInfo?: string(name='DeliveryInfo', example='{\\\\"id\\\\":\\\\"20\\\\",\\\\"postFee\\\\":0,\\\\"serviceType\\\\":-4}'),
  extInfo?: string(name='ExtInfo', example='{}'),
  orderExpireTime?: long(name='OrderExpireTime', example='3600'),
  orderItems?: string(name='OrderItems', description='This parameter is required.', example='[{\\\\"lmItemId\\\\":\\\\"100***1-6300***472\\\\",\\\\"number\\\\":1,\\\\"outDiscountFee\\\\":\\\\"6810\\\\",\\\\"price\\\\":\\\\"8800\\\\",\\\\"skuId\\\\":4649***225}]'),
  outDiscountInfos?: string(name='OutDiscountInfos', example='{\\\\"promotionInfos\\\\":[{\\\\"discountFee\\\\":\\\\"10000\\\\",\\\\"promotionInstanceId\\\\":\\\\"{\\\\\\\\\\\\"couponId\\\\\\\\\\\\":\\\\\\\\\\\\"136807***98136\\\\\\\\\\\\",\\\\\\\\\\\\"couponTemplateId\\\\\\\\\\\\":\\\\\\\\\\\\"50***5\\\\\\\\\\\\"}\\\\"}],\\\\"totalDiscountFee\\\\":\\\\"10000\\\\"}'),
  outTradeId?: string(name='OutTradeId', example='134860***596130'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='321**123'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='user***001'),
}

model CreateOutDiscountOrderWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    allIdsMap?: map[string]object(name='AllIdsMap'),
    app?: string(name='App', example='lin***app'),
    lmOrderIds?: [ string ](name='LmOrderIds'),
    orderIds?: [ string ](name='OrderIds'),
    payTradeIds?: [ string ](name='PayTradeIds'),
    redirectUrl?: string(name='RedirectUrl', example='https://aliyundoc.com'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='3CDA6C55-18F1-53A6-B721-F5E26CBC95BE'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='""'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='5'),
}

model CreateOutDiscountOrderWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateOutDiscountOrderWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request CreateOutDiscountOrderWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateOutDiscountOrderWithDesignatedTbUidResponse
 */
async function createOutDiscountOrderWithDesignatedTbUidWithOptions(request: CreateOutDiscountOrderWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): CreateOutDiscountOrderWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.buyerMessages)) {
    body['BuyerMessages'] = request.buyerMessages;
  }
  if (!Util.isUnset(request.deliveryAddress)) {
    body['DeliveryAddress'] = request.deliveryAddress;
  }
  if (!Util.isUnset(request.deliveryInfo)) {
    body['DeliveryInfo'] = request.deliveryInfo;
  }
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.orderExpireTime)) {
    body['OrderExpireTime'] = request.orderExpireTime;
  }
  if (!Util.isUnset(request.orderItems)) {
    body['OrderItems'] = request.orderItems;
  }
  if (!Util.isUnset(request.outDiscountInfos)) {
    body['OutDiscountInfos'] = request.outDiscountInfos;
  }
  if (!Util.isUnset(request.outTradeId)) {
    body['OutTradeId'] = request.outTradeId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateOutDiscountOrderWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateOutDiscountOrderWithDesignatedTbUidRequest
 * @return CreateOutDiscountOrderWithDesignatedTbUidResponse
 */
async function createOutDiscountOrderWithDesignatedTbUid(request: CreateOutDiscountOrderWithDesignatedTbUidRequest): CreateOutDiscountOrderWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return createOutDiscountOrderWithDesignatedTbUidWithOptions(request, runtime);
}

model CreatePayUrlRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20*****0001'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='9f99f38030254728***'),
  buyInfo?: string(name='BuyInfo', description='This parameter is required.'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='1'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model CreatePayUrlResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    lmOrderList?: [ string ](name='LmOrderList'),
    orderIds?: [ string ](name='OrderIds'),
    payTradeIds?: [ string ](name='PayTradeIds'),
    redirectUrl?: string(name='RedirectUrl', example='"www.taobao.com"'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
  success?: boolean(name='Success', example='True'),
}

model CreatePayUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePayUrlResponseBody(name='body'),
}

/**
 * @param request CreatePayUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePayUrlResponse
 */
async function createPayUrlWithOptions(request: CreatePayUrlRequest, runtime: Util.RuntimeOptions): CreatePayUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.buyInfo)) {
    body['BuyInfo'] = request.buyInfo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreatePayUrl',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreatePayUrlRequest
 * @return CreatePayUrlResponse
 */
async function createPayUrl(request: CreatePayUrlRequest): CreatePayUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPayUrlWithOptions(request, runtime);
}

model CreateSettleConfirmRequest {
  bizId?: string(name='BizId', example='LMALL20******05'),
  extInfo?: string(name='ExtInfo'),
  merchantId?: string(name='MerchantId', description='This parameter is required.'),
  outRequestNo?: string(name='OutRequestNo', description='This parameter is required.'),
  outTradeNo?: string(name='OutTradeNo'),
  settleInfo?: string(name='SettleInfo', description='This parameter is required.'),
  tradeNo?: string(name='TradeNo'),
}

model CreateSettleConfirmResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='5E2D59BA-4EB0-45C4-A0D7-D98C1A4B320B'),
  tradeSettleConfirmResponse?: {
    outRequestNo?: string(name='OutRequestNo'),
    tradeNo?: string(name='TradeNo'),
  }(name='TradeSettleConfirmResponse'),
}

model CreateSettleConfirmResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateSettleConfirmResponseBody(name='body'),
}

/**
 * @param request CreateSettleConfirmRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateSettleConfirmResponse
 */
async function createSettleConfirmWithOptions(request: CreateSettleConfirmRequest, runtime: Util.RuntimeOptions): CreateSettleConfirmResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.merchantId)) {
    body['MerchantId'] = request.merchantId;
  }
  if (!Util.isUnset(request.outRequestNo)) {
    body['OutRequestNo'] = request.outRequestNo;
  }
  if (!Util.isUnset(request.outTradeNo)) {
    body['OutTradeNo'] = request.outTradeNo;
  }
  if (!Util.isUnset(request.settleInfo)) {
    body['SettleInfo'] = request.settleInfo;
  }
  if (!Util.isUnset(request.tradeNo)) {
    body['TradeNo'] = request.tradeNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateSettleConfirm',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateSettleConfirmRequest
 * @return CreateSettleConfirmResponse
 */
async function createSettleConfirm(request: CreateSettleConfirmRequest): CreateSettleConfirmResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSettleConfirmWithOptions(request, runtime);
}

model CreateVirtualProductOrderRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210508****'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='221122411****'),
  deliveryAddress?: string(name='DeliveryAddress'),
  extJson?: string(name='ExtJson', example='{\\\\"chargeAccount\\\\":\\\\"1510380****\\\\",\\\\"mobileNo\\\\":\\\\"186****3931\\\\"}'),
  itemId?: long(name='ItemId', example='66985559****'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='66985559****'),
      lmItemId?: string(name='LmItemId', example='10001036-66644894****'),
      quantity?: int32(name='Quantity', example='1'),
      skuId?: long(name='SkuId', example='456458315****'),
    }
  ](name='ItemList'),
  lmItemId?: string(name='LmItemId', example='10001036-66644894****'),
  orderExpireTime?: long(name='OrderExpireTime', example='900'),
  outTradeId?: string(name='OutTradeId', description='This parameter is required.', example='963****'),
  quantity?: long(name='Quantity', example='1'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='221122411****'),
  totalAmount?: long(name='TotalAmount', example='4990'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model CreateVirtualProductOrderResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    lmOrderList?: {
      lmOrderList?: [ 
      {
        lmOrderId?: string(name='LmOrderId', example='39435****'),
      }
    ](name='LmOrderList')
    }(name='LmOrderList'),
    orderIds?: {
      orderIds?: [ string ](name='OrderIds')
    }(name='OrderIds'),
    payTradeIds?: {
      payTradeIds?: [ string ](name='PayTradeIds')
    }(name='PayTradeIds'),
    redirectUrl?: string(name='RedirectUrl', example='https://console.authing.cn/console/g*********'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='3B55509D-20AC-5BD5-9A81-D6B7382E****'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='True'),
  totalCount?: long(name='TotalCount', example='5'),
}

model CreateVirtualProductOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateVirtualProductOrderResponseBody(name='body'),
}

/**
 * @param request CreateVirtualProductOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateVirtualProductOrderResponse
 */
async function createVirtualProductOrderWithOptions(request: CreateVirtualProductOrderRequest, runtime: Util.RuntimeOptions): CreateVirtualProductOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.deliveryAddress)) {
    query['DeliveryAddress'] = request.deliveryAddress;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.itemList)) {
    query['ItemList'] = request.itemList;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.orderExpireTime)) {
    query['OrderExpireTime'] = request.orderExpireTime;
  }
  if (!Util.isUnset(request.outTradeId)) {
    query['OutTradeId'] = request.outTradeId;
  }
  if (!Util.isUnset(request.quantity)) {
    query['Quantity'] = request.quantity;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.totalAmount)) {
    query['TotalAmount'] = request.totalAmount;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateVirtualProductOrder',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateVirtualProductOrderRequest
 * @return CreateVirtualProductOrderResponse
 */
async function createVirtualProductOrder(request: CreateVirtualProductOrderRequest): CreateVirtualProductOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return createVirtualProductOrderWithOptions(request, runtime);
}

model CreateWithholdTradeRequest {
  agreementNo?: string(name='AgreementNo', example='2021******59220'),
  body?: string(name='Body', example='""'),
  buyerId?: string(name='BuyerId', example='12******209'),
  extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
  goodsDetail?: string(name='GoodsDetail', example='""'),
  merchantId?: string(name='MerchantId', example='64******721'),
  outRequestNo?: string(name='OutRequestNo', example='94A30BED-4321-4A94-B948-EB896493B4BF'),
  outTradeNo?: string(name='OutTradeNo', example='23******274'),
  settleMode?: string(name='SettleMode', example='""'),
  subject?: string(name='Subject', example='""'),
  totalAmount?: string(name='TotalAmount', example='6900'),
}

model CreateWithholdTradeResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D08E8'),
  withholdTradeResponse?: {
    outRequestNo?: string(name='OutRequestNo', example='57E4FE52-0750-4456-AA8F-ECC9FA0F8DF0'),
    outTradeNo?: string(name='OutTradeNo', example='23******274'),
    paymentDate?: string(name='PaymentDate', example='2022-04-01 12:00:00'),
    tradeNo?: string(name='TradeNo', example='32******372'),
  }(name='WithholdTradeResponse'),
}

model CreateWithholdTradeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateWithholdTradeResponseBody(name='body'),
}

/**
 * @param request CreateWithholdTradeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateWithholdTradeResponse
 */
async function createWithholdTradeWithOptions(request: CreateWithholdTradeRequest, runtime: Util.RuntimeOptions): CreateWithholdTradeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.agreementNo)) {
    body['AgreementNo'] = request.agreementNo;
  }
  if (!Util.isUnset(request.body)) {
    body['Body'] = request.body;
  }
  if (!Util.isUnset(request.buyerId)) {
    body['BuyerId'] = request.buyerId;
  }
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.goodsDetail)) {
    body['GoodsDetail'] = request.goodsDetail;
  }
  if (!Util.isUnset(request.merchantId)) {
    body['MerchantId'] = request.merchantId;
  }
  if (!Util.isUnset(request.outRequestNo)) {
    body['OutRequestNo'] = request.outRequestNo;
  }
  if (!Util.isUnset(request.outTradeNo)) {
    body['OutTradeNo'] = request.outTradeNo;
  }
  if (!Util.isUnset(request.settleMode)) {
    body['SettleMode'] = request.settleMode;
  }
  if (!Util.isUnset(request.subject)) {
    body['Subject'] = request.subject;
  }
  if (!Util.isUnset(request.totalAmount)) {
    body['TotalAmount'] = request.totalAmount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateWithholdTrade',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request CreateWithholdTradeRequest
 * @return CreateWithholdTradeResponse
 */
async function createWithholdTrade(request: CreateWithholdTradeRequest): CreateWithholdTradeResponse {
  var runtime = new Util.RuntimeOptions{};
  return createWithholdTradeWithOptions(request, runtime);
}

model DeductUserPointRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='10'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******003'),
  extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='202112******31746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******637'),
  title?: string(name='Title', description='This parameter is required.'),
}

model DeductUserPointShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='10'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******003'),
  extInfoShrink?: string(name='ExtInfo', example='{"key":"value"}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='202112******31746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******637'),
  title?: string(name='Title', description='This parameter is required.'),
}

model DeductUserPointResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    accountId?: string(name='AccountId', example='11******18'),
    action?: string(name='Action', example='""'),
    amount?: long(name='Amount', example='10'),
    bizId?: string(name='BizId', example='LMALL20******003'),
    bizUid?: string(name='BizUid', example='22******637'),
    description?: string(name='Description'),
    extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
    idempotentId?: string(name='IdempotentId', example='20211212******31746-1202'),
    name?: string(name='Name'),
    recordId?: string(name='RecordId', example='""'),
    rest?: long(name='Rest', example='2000'),
    ruleId?: string(name='RuleId', example='136'),
    status?: string(name='Status', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
}

model DeductUserPointResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeductUserPointResponseBody(name='body'),
}

/**
 * @summary 扣减用户积分
 *
 * @param tmpReq DeductUserPointRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeductUserPointResponse
 */
async function deductUserPointWithOptions(tmpReq: DeductUserPointRequest, runtime: Util.RuntimeOptions): DeductUserPointResponse {
  Util.validateModel(tmpReq);
  var request = new DeductUserPointShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.amount)) {
    query['Amount'] = request.amount;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.idempotentId)) {
    query['IdempotentId'] = request.idempotentId;
  }
  if (!Util.isUnset(request.message)) {
    query['Message'] = request.message;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeductUserPoint',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 扣减用户积分
 *
 * @param request DeductUserPointRequest
 * @return DeductUserPointResponse
 */
async function deductUserPoint(request: DeductUserPointRequest): DeductUserPointResponse {
  var runtime = new Util.RuntimeOptions{};
  return deductUserPointWithOptions(request, runtime);
}

model DeleteBizItemsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2*****001'),
  itemIdList?: [ long ](name='ItemIdList', description='This parameter is required.'),
  subBizId?: string(name='SubBizId'),
}

model DeleteBizItemsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
}

model DeleteBizItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteBizItemsResponseBody(name='body'),
}

/**
 * @param request DeleteBizItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteBizItemsResponse
 */
async function deleteBizItemsWithOptions(request: DeleteBizItemsRequest, runtime: Util.RuntimeOptions): DeleteBizItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.itemIdList)) {
    query['ItemIdList'] = request.itemIdList;
  }
  if (!Util.isUnset(request.subBizId)) {
    query['SubBizId'] = request.subBizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteBizItems',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteBizItemsRequest
 * @return DeleteBizItemsResponse
 */
async function deleteBizItems(request: DeleteBizItemsRequest): DeleteBizItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteBizItemsWithOptions(request, runtime);
}

model DeleteItemLimitRuleRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2021083****'),
  itemId?: long(name='ItemId', example='57835029****'),
  lmActivityId?: long(name='LmActivityId', example='679'),
  lmItemId?: string(name='LmItemId', example='10000035-6193664*****'),
  ruleId?: long(name='RuleId', description='This parameter is required.'),
  subBizCode?: string(name='SubBizCode', example='7ddaba53d5be4173808f2335eac0****'),
}

model DeleteItemLimitRuleResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='The specified parameter %s value is not valid.'),
  model?: boolean(name='Model', example='true'),
  requestId?: string(name='RequestId', example='A7BE4356-7F92-533E-A31B-2EBF2D67****'),
}

model DeleteItemLimitRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteItemLimitRuleResponseBody(name='body'),
}

/**
 * @param request DeleteItemLimitRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteItemLimitRuleResponse
 */
async function deleteItemLimitRuleWithOptions(request: DeleteItemLimitRuleRequest, runtime: Util.RuntimeOptions): DeleteItemLimitRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmActivityId)) {
    query['LmActivityId'] = request.lmActivityId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.subBizCode)) {
    query['SubBizCode'] = request.subBizCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteItemLimitRule',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request DeleteItemLimitRuleRequest
 * @return DeleteItemLimitRuleResponse
 */
async function deleteItemLimitRule(request: DeleteItemLimitRuleRequest): DeleteItemLimitRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteItemLimitRuleWithOptions(request, runtime);
}

model DownloadCpsBillFileRequest {
  billId?: string(name='BillId', example='FC10000007371****'),
  bizId?: string(name='BizId', example='LMALL20210802****'),
}

model DownloadCpsBillFileResponseBody = {
  bizViewData?: map[string]any(name='BizViewData'),
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  ossUrl?: string(name='OssUrl', example='https://linkedmall-console.oss-cn-shanghai.aliyuncs.com/17294373****2052/linkedmall.json'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='5'),
}

model DownloadCpsBillFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DownloadCpsBillFileResponseBody(name='body'),
}

/**
 * @summary 下载佣金账单明细文件
 *
 * @param request DownloadCpsBillFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DownloadCpsBillFileResponse
 */
async function downloadCpsBillFileWithOptions(request: DownloadCpsBillFileRequest, runtime: Util.RuntimeOptions): DownloadCpsBillFileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.billId)) {
    body['BillId'] = request.billId;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DownloadCpsBillFile',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下载佣金账单明细文件
 *
 * @param request DownloadCpsBillFileRequest
 * @return DownloadCpsBillFileResponse
 */
async function downloadCpsBillFile(request: DownloadCpsBillFileRequest): DownloadCpsBillFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return downloadCpsBillFileWithOptions(request, runtime);
}

model DownloadItemBillFileRequest {
  billId?: string(name='BillId', example='FC10000008458****'),
  bizId?: string(name='BizId', example='LMALL20191223****'),
}

model DownloadItemBillFileResponseBody = {
  bizViewData?: map[string]any(name='BizViewData'),
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='RESULT_STATUS_UNKOWN'),
  ossUrl?: string(name='OssUrl', example='https://linkedmall-console.oss-cn-shanghai.aliyuncs.com/15422025****2919/linkedmall.har'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='0CC07385-BA71-509F-BA7E-F7EB2024C151'),
  subCode?: string(name='SubCode', example='unit-access-layer'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model DownloadItemBillFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DownloadItemBillFileResponseBody(name='body'),
}

/**
 * @summary 下载商品账单明细文件
 *
 * @param request DownloadItemBillFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DownloadItemBillFileResponse
 */
async function downloadItemBillFileWithOptions(request: DownloadItemBillFileRequest, runtime: Util.RuntimeOptions): DownloadItemBillFileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.billId)) {
    body['BillId'] = request.billId;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DownloadItemBillFile',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下载商品账单明细文件
 *
 * @param request DownloadItemBillFileRequest
 * @return DownloadItemBillFileResponse
 */
async function downloadItemBillFile(request: DownloadItemBillFileRequest): DownloadItemBillFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return downloadItemBillFileWithOptions(request, runtime);
}

model DownloadOrderTransactionDetailFileRequest {
  bizId?: string(name='BizId', example='LMALL202111020001'),
  recordId?: string(name='RecordId', example='ORDER-b454a111647844f5aa005dda94454751'),
}

model DownloadOrderTransactionDetailFileResponseBody = {
  bizViewData?: map[string]any(name='BizViewData'),
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  ossUrl?: string(name='OssUrl', example='https://linkedmall-console.oss-cn-shanghai.aliyuncs.com/1245321481945549/linkedmall.json'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='204F5C60-0B34-5718-AF93-9BD26B37****'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model DownloadOrderTransactionDetailFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DownloadOrderTransactionDetailFileResponseBody(name='body'),
}

/**
 * @summary 下载订单交易明细文件
 *
 * @param request DownloadOrderTransactionDetailFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DownloadOrderTransactionDetailFileResponse
 */
async function downloadOrderTransactionDetailFileWithOptions(request: DownloadOrderTransactionDetailFileRequest, runtime: Util.RuntimeOptions): DownloadOrderTransactionDetailFileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.recordId)) {
    body['RecordId'] = request.recordId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DownloadOrderTransactionDetailFile',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 下载订单交易明细文件
 *
 * @param request DownloadOrderTransactionDetailFileRequest
 * @return DownloadOrderTransactionDetailFileResponse
 */
async function downloadOrderTransactionDetailFile(request: DownloadOrderTransactionDetailFileRequest): DownloadOrderTransactionDetailFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return downloadOrderTransactionDetailFileWithOptions(request, runtime);
}

model EnableOrderRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL201912040001'),
  bizUid?: string(name='BizUid', description='This parameter is required.'),
  extJson?: string(name='ExtJson'),
  lmOrderId?: string(name='LmOrderId'),
  outTradeId?: string(name='OutTradeId', description='This parameter is required.'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount'),
}

model EnableOrderResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId'),
  message?: string(name='Message'),
  model?: {
    lmOrderList?: {
      lmOrderList?: [ 
      {
        lmOrderId?: string(name='LmOrderId'),
      }
    ](name='LmOrderList')
    }(name='LmOrderList'),
    orderIds?: {
      orderIds?: [ string ](name='OrderIds')
    }(name='OrderIds'),
    payTradeIds?: {
      payTradeIds?: [ string ](name='PayTradeIds')
    }(name='PayTradeIds'),
    redirectUrl?: string(name='RedirectUrl'),
  }(name='Model'),
  requestId?: string(name='RequestId'),
  subCode?: string(name='SubCode'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success'),
  totalCount?: long(name='TotalCount'),
}

model EnableOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EnableOrderResponseBody(name='body'),
}

/**
 * @param request EnableOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return EnableOrderResponse
 */
async function enableOrderWithOptions(request: EnableOrderRequest, runtime: Util.RuntimeOptions): EnableOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.outTradeId)) {
    query['OutTradeId'] = request.outTradeId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EnableOrder',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request EnableOrderRequest
 * @return EnableOrderResponse
 */
async function enableOrder(request: EnableOrderRequest): EnableOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableOrderWithOptions(request, runtime);
}

model EnableOrderWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20***003'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.', example='45***23'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='384***213'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='u***002'),
}

model EnableOrderWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    lmOrderList?: [ 
      {
        extJson?: map[string]string(name='ExtJson'),
        lmOrderId?: string(name='LmOrderId', example='45***23'),
        subLmOrderIdList?: [ string ](name='SubLmOrderIdList'),
      }
    ](name='LmOrderList'),
    orderIds?: [ string ](name='OrderIds'),
    payTradeIds?: [ string ](name='PayTradeIds'),
    redirectUrl?: string(name='RedirectUrl', example='https://aliyundoc.com'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='1'),
  requestId?: string(name='RequestId', example='26F4B2C7-93***CC-AE76C9B00D2F'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model EnableOrderWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EnableOrderWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request EnableOrderWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return EnableOrderWithDesignatedTbUidResponse
 */
async function enableOrderWithDesignatedTbUidWithOptions(request: EnableOrderWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): EnableOrderWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    body['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'EnableOrderWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request EnableOrderWithDesignatedTbUidRequest
 * @return EnableOrderWithDesignatedTbUidResponse
 */
async function enableOrderWithDesignatedTbUid(request: EnableOrderWithDesignatedTbUidRequest): EnableOrderWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return enableOrderWithDesignatedTbUidWithOptions(request, runtime);
}

model ExecuteNodeRequest {
  bizId?: string(name='BizId', example='LMALL20******001'),
  nodeId?: string(name='NodeId', description='This parameter is required.', example='""'),
  nodeInstanceId?: string(name='NodeInstanceId', example='""'),
  processId?: string(name='ProcessId', description='This parameter is required.', example='""'),
  processInstanceId?: string(name='ProcessInstanceId', example='""'),
  requestData?: string(name='RequestData', example='""'),
}

model ExecuteNodeResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    processInstanceId?: string(name='ProcessInstanceId', example='""'),
    responseData?: map[string]any(name='ResponseData'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='75F3A591-B1A6-5EFF-8ABF-35AB8804DFA0'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model ExecuteNodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExecuteNodeResponseBody(name='body'),
}

/**
 * @param request ExecuteNodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExecuteNodeResponse
 */
async function executeNodeWithOptions(request: ExecuteNodeRequest, runtime: Util.RuntimeOptions): ExecuteNodeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.nodeId)) {
    query['NodeId'] = request.nodeId;
  }
  if (!Util.isUnset(request.nodeInstanceId)) {
    query['NodeInstanceId'] = request.nodeInstanceId;
  }
  if (!Util.isUnset(request.processId)) {
    query['ProcessId'] = request.processId;
  }
  if (!Util.isUnset(request.processInstanceId)) {
    query['ProcessInstanceId'] = request.processInstanceId;
  }
  if (!Util.isUnset(request.requestData)) {
    query['RequestData'] = request.requestData;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ExecuteNode',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ExecuteNodeRequest
 * @return ExecuteNodeResponse
 */
async function executeNode(request: ExecuteNodeRequest): ExecuteNodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return executeNodeWithOptions(request, runtime);
}

model FreezeUserPointRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='1000'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='202112******31746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******3748'),
  title?: string(name='Title', description='This parameter is required.'),
}

model FreezeUserPointShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='1000'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  extInfoShrink?: string(name='ExtInfo', example='{"key":"value"}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='202112******31746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******3748'),
  title?: string(name='Title', description='This parameter is required.'),
}

model FreezeUserPointResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    accountId?: string(name='AccountId', example='11******26'),
    action?: string(name='Action', example='""'),
    amount?: long(name='Amount', example='1000'),
    bizId?: string(name='BizId', example='LMALL20******008'),
    bizUid?: string(name='BizUid', example='22******3748'),
    description?: string(name='Description'),
    extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
    idempotentId?: string(name='IdempotentId', example='202112******31746-1202'),
    name?: string(name='Name'),
    recordId?: string(name='RecordId', example='71******92'),
    rest?: long(name='Rest', example='2000'),
    ruleId?: string(name='RuleId', example='""'),
    status?: string(name='Status', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='5E2D59BA-4EB0-45C4-A0D7-D98C1A4B320B'),
}

model FreezeUserPointResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: FreezeUserPointResponseBody(name='body'),
}

/**
 * @summary 冻结用户积分
 *
 * @param tmpReq FreezeUserPointRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return FreezeUserPointResponse
 */
async function freezeUserPointWithOptions(tmpReq: FreezeUserPointRequest, runtime: Util.RuntimeOptions): FreezeUserPointResponse {
  Util.validateModel(tmpReq);
  var request = new FreezeUserPointShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.amount)) {
    query['Amount'] = request.amount;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.idempotentId)) {
    query['IdempotentId'] = request.idempotentId;
  }
  if (!Util.isUnset(request.message)) {
    query['Message'] = request.message;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'FreezeUserPoint',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 冻结用户积分
 *
 * @param request FreezeUserPointRequest
 * @return FreezeUserPointResponse
 */
async function freezeUserPoint(request: FreezeUserPointRequest): FreezeUserPointResponse {
  var runtime = new Util.RuntimeOptions{};
  return freezeUserPointWithOptions(request, runtime);
}

model GetActivityGameInfoRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  activityId?: string(name='ActivityId', description='This parameter is required.', example='673'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211224****'),
  extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
  gameId?: string(name='GameId', description='This parameter is required.', example='673476420068894723'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='287384877****'),
}

model GetActivityGameInfoShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  activityId?: string(name='ActivityId', description='This parameter is required.', example='673'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211224****'),
  extInfoShrink?: string(name='ExtInfo', example='{"key":"value"}'),
  gameId?: string(name='GameId', description='This parameter is required.', example='673476420068894723'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='287384877****'),
}

model GetActivityGameInfoResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
    gameDTO?: string(name='GameDTO'),
    gameShowInfo?: string(name='GameShowInfo'),
    userGameCoinInfos?: string(name='UserGameCoinInfos'),
    userProcessDTO?: string(name='UserProcessDTO'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED****'),
}

model GetActivityGameInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetActivityGameInfoResponseBody(name='body'),
}

/**
 * @summary 获取活动玩法信息
 *
 * @param tmpReq GetActivityGameInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetActivityGameInfoResponse
 */
async function getActivityGameInfoWithOptions(tmpReq: GetActivityGameInfoRequest, runtime: Util.RuntimeOptions): GetActivityGameInfoResponse {
  Util.validateModel(tmpReq);
  var request = new GetActivityGameInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.activityId)) {
    query['ActivityId'] = request.activityId;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.gameId)) {
    query['GameId'] = request.gameId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetActivityGameInfo',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取活动玩法信息
 *
 * @param request GetActivityGameInfoRequest
 * @return GetActivityGameInfoResponse
 */
async function getActivityGameInfo(request: GetActivityGameInfoRequest): GetActivityGameInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getActivityGameInfoWithOptions(request, runtime);
}

model GetCategoryChainRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******003'),
  categoryId?: long(name='CategoryId', example='50012478'),
  itemId?: long(name='ItemId', example='637284556514'),
  lmItemId?: string(name='LmItemId', example='10000055-609650881234'),
}

model GetCategoryChainResponseBody = {
  categoryList?: [ 
    {
      categoryId?: long(name='CategoryId', example='12123'),
      name?: string(name='Name'),
    }
  ](name='CategoryList'),
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId'),
}

model GetCategoryChainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCategoryChainResponseBody(name='body'),
}

/**
 * @param request GetCategoryChainRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCategoryChainResponse
 */
async function getCategoryChainWithOptions(request: GetCategoryChainRequest, runtime: Util.RuntimeOptions): GetCategoryChainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.categoryId)) {
    query['CategoryId'] = request.categoryId;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCategoryChain',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetCategoryChainRequest
 * @return GetCategoryChainResponse
 */
async function getCategoryChain(request: GetCategoryChainRequest): GetCategoryChainResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCategoryChainWithOptions(request, runtime);
}

model GetCategoryListRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20*****08'),
  categoryId?: long(name='CategoryId', example='50000852'),
}

model GetCategoryListResponseBody = {
  categoryList?: {
    category?: [ 
    {
      categoryId?: long(name='CategoryId', example='12312312'),
      name?: string(name='Name'),
    }
  ](name='Category')
  }(name='CategoryList'),
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='96B4141C-A3CD-5162-B435-4780A75E3D97'),
}

model GetCategoryListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCategoryListResponseBody(name='body'),
}

/**
 * @param request GetCategoryListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCategoryListResponse
 */
async function getCategoryListWithOptions(request: GetCategoryListRequest, runtime: Util.RuntimeOptions): GetCategoryListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.categoryId)) {
    query['CategoryId'] = request.categoryId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCategoryList',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetCategoryListRequest
 * @return GetCategoryListResponse
 */
async function getCategoryList(request: GetCategoryListRequest): GetCategoryListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCategoryListWithOptions(request, runtime);
}

model GetCustomServiceUrlRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210315****'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='220077837****'),
  cuid?: string(name='Cuid', example='5512876'),
  nick?: string(name='Nick', example='123213***1212'),
  sellerId?: string(name='SellerId', example='220680193****'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='220077837****'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model GetCustomServiceUrlResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED****'),
  urlData?: {
    returnUrl?: string(name='ReturnUrl'),
  }(name='UrlData'),
}

model GetCustomServiceUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCustomServiceUrlResponseBody(name='body'),
}

/**
 * @param request GetCustomServiceUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCustomServiceUrlResponse
 */
async function getCustomServiceUrlWithOptions(request: GetCustomServiceUrlRequest, runtime: Util.RuntimeOptions): GetCustomServiceUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.cuid)) {
    query['Cuid'] = request.cuid;
  }
  if (!Util.isUnset(request.nick)) {
    query['Nick'] = request.nick;
  }
  if (!Util.isUnset(request.sellerId)) {
    query['SellerId'] = request.sellerId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCustomServiceUrl',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetCustomServiceUrlRequest
 * @return GetCustomServiceUrlResponse
 */
async function getCustomServiceUrl(request: GetCustomServiceUrlRequest): GetCustomServiceUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCustomServiceUrlWithOptions(request, runtime);
}

model GetGuidePageRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2***100001'),
}

model GetGuidePageResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  miniShopInfo?: [ 
    {
      bizId?: string(name='BizId', example='LMALL20211012****'),
      liteShopId?: string(name='LiteShopId', example='10000001'),
      name?: string(name='Name'),
      src?: string(name='Src'),
    }
  ](name='MiniShopInfo'),
  requestId?: string(name='RequestId', example='BA157565-3358-5D80-9330-************'),
}

model GetGuidePageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetGuidePageResponseBody(name='body'),
}

/**
 * @param request GetGuidePageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetGuidePageResponse
 */
async function getGuidePageWithOptions(request: GetGuidePageRequest, runtime: Util.RuntimeOptions): GetGuidePageResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetGuidePage',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetGuidePageRequest
 * @return GetGuidePageResponse
 */
async function getGuidePage(request: GetGuidePageRequest): GetGuidePageResponse {
  var runtime = new Util.RuntimeOptions{};
  return getGuidePageWithOptions(request, runtime);
}

model GetItemPromotionRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******003'),
  itemId?: long(name='ItemId', description='This parameter is required.', example='66262416****'),
  lmItemId?: string(name='LmItemId', example='10000035-6193664*****'),
}

model GetItemPromotionResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemPromotionModel?: {
    endTime?: string(name='EndTime', example='2022-02-06 10:01:00'),
    extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
    itemId?: long(name='ItemId', example='66440412****'),
    lmItemId?: string(name='LmItemId', example='10000035-63064613****'),
    promotionDesc?: string(name='PromotionDesc', example='""'),
    promotionFlag?: boolean(name='PromotionFlag', example='true'),
    promotionId?: string(name='PromotionId', example='68476201884251****'),
    promotionName?: string(name='PromotionName'),
    skuPromotion?: map[string]any(name='SkuPromotion', example='{}'),
    startTime?: string(name='StartTime', example='2022-01-01 00:00:00'),
  }(name='ItemPromotionModel'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='7152F15C-7298-5531-9A76-2ED2C331****'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
}

model GetItemPromotionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetItemPromotionResponseBody(name='body'),
}

/**
 * @param request GetItemPromotionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetItemPromotionResponse
 */
async function getItemPromotionWithOptions(request: GetItemPromotionRequest, runtime: Util.RuntimeOptions): GetItemPromotionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetItemPromotion',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetItemPromotionRequest
 * @return GetItemPromotionResponse
 */
async function getItemPromotion(request: GetItemPromotionRequest): GetItemPromotionResponse {
  var runtime = new Util.RuntimeOptions{};
  return getItemPromotionWithOptions(request, runtime);
}

model GetLoginPageRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210830****'),
  failUrl?: string(name='FailUrl', example='https://********'),
  targetUrl?: string(name='TargetUrl', example='https://********'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='287381784****'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model GetLoginPageResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='1267088B-4695-50DC-97B9-9E4F89D1****'),
  urlData?: {
    returnUrl?: string(name='ReturnUrl', example='https://**********'),
  }(name='UrlData'),
}

model GetLoginPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetLoginPageResponseBody(name='body'),
}

/**
 * @param request GetLoginPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetLoginPageResponse
 */
async function getLoginPageWithOptions(request: GetLoginPageRequest, runtime: Util.RuntimeOptions): GetLoginPageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.failUrl)) {
    body['FailUrl'] = request.failUrl;
  }
  if (!Util.isUnset(request.targetUrl)) {
    body['TargetUrl'] = request.targetUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetLoginPage',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetLoginPageRequest
 * @return GetLoginPageResponse
 */
async function getLoginPage(request: GetLoginPageRequest): GetLoginPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLoginPageWithOptions(request, runtime);
}

model GetSwitchUrlRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211119****'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='221249435****'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='221249435****'),
  url?: string(name='Url', description='This parameter is required.'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model GetSwitchUrlResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='DAAA6391-3339-5333-9E4D-C71CD26A****'),
  url?: string(name='Url', example='https://*****************'),
}

model GetSwitchUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetSwitchUrlResponseBody(name='body'),
}

/**
 * @param request GetSwitchUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetSwitchUrlResponse
 */
async function getSwitchUrlWithOptions(request: GetSwitchUrlRequest, runtime: Util.RuntimeOptions): GetSwitchUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.url)) {
    body['Url'] = request.url;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetSwitchUrl',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetSwitchUrlRequest
 * @return GetSwitchUrlResponse
 */
async function getSwitchUrl(request: GetSwitchUrlRequest): GetSwitchUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getSwitchUrlWithOptions(request, runtime);
}

model GetUserInfoRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='alipay'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  queryJson?: string(name='QueryJson', example='{}'),
  userFlag?: string(name='UserFlag', description='This parameter is required.', example='""'),
}

model GetUserInfoResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  loginResult?: {
    bizId?: string(name='BizId', example='LMALL20******001'),
    bizUid?: string(name='BizUid', example='18******60'),
    bizUserName?: string(name='BizUserName', example='""'),
    extInfo?: map[string]any(name='ExtInfo', example='{}'),
    lmUserId?: long(name='LmUserId', example='10******3'),
    returnUrl?: string(name='ReturnUrl', example='""'),
    subBizId?: [ string ](name='SubBizId'),
  }(name='LoginResult'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='9054694D-E3AF-5A07-9647-0537026A45E1'),
}

model GetUserInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserInfoResponseBody(name='body'),
}

/**
 * @param request GetUserInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserInfoResponse
 */
async function getUserInfoWithOptions(request: GetUserInfoRequest, runtime: Util.RuntimeOptions): GetUserInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.userFlag)) {
    query['UserFlag'] = request.userFlag;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.queryJson)) {
    body['QueryJson'] = request.queryJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetUserInfo',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetUserInfoRequest
 * @return GetUserInfoResponse
 */
async function getUserInfo(request: GetUserInfoRequest): GetUserInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserInfoWithOptions(request, runtime);
}

model GetUserTokenPageRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  expireSeconds?: long(name='ExpireSeconds', description='This parameter is required.', example='86400'),
  extJson?: string(name='ExtJson', example='{}'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******234'),
  userNick?: string(name='UserNick', example='""'),
}

model GetUserTokenPageResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    url?: string(name='Url', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='B7E4EF89-DBC3-5CD0-9993-02D8C13E7177'),
}

model GetUserTokenPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserTokenPageResponseBody(name='body'),
}

/**
 * @summary 获取种用户登录态cookie的页面
 *
 * @param request GetUserTokenPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserTokenPageResponse
 */
async function getUserTokenPageWithOptions(request: GetUserTokenPageRequest, runtime: Util.RuntimeOptions): GetUserTokenPageResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetUserTokenPage',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取种用户登录态cookie的页面
 *
 * @param request GetUserTokenPageRequest
 * @return GetUserTokenPageResponse
 */
async function getUserTokenPage(request: GetUserTokenPageRequest): GetUserTokenPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserTokenPageWithOptions(request, runtime);
}

model GetWithholdSignPageUrlRequest {
  deviceType?: string(name='DeviceType', example='""'),
  extInfo?: string(name='ExtInfo', example='{}'),
  externalAgreementNo?: string(name='ExternalAgreementNo', example='223******2637'),
  identityParameters?: string(name='IdentityParameters', example='""'),
  merchantId?: string(name='MerchantId', example='64******721'),
  merchantServiceDescription?: string(name='MerchantServiceDescription'),
  merchantServiceName?: string(name='MerchantServiceName'),
  notifyUrl?: string(name='NotifyUrl', example='""'),
  outRequestNo?: string(name='OutRequestNo', example='0AF7F437-C869-477D-A21A-CF402493FFFE'),
  returnUrl?: string(name='ReturnUrl', example='""'),
}

model GetWithholdSignPageUrlResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D08E8'),
  withholdSignResponse?: {
    outRequestNo?: string(name='OutRequestNo', example='0AF7F437-C869-477D-A21A-CF402493FFFE'),
    pageUrl?: string(name='PageUrl'),
  }(name='WithholdSignResponse'),
}

model GetWithholdSignPageUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWithholdSignPageUrlResponseBody(name='body'),
}

/**
 * @param request GetWithholdSignPageUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWithholdSignPageUrlResponse
 */
async function getWithholdSignPageUrlWithOptions(request: GetWithholdSignPageUrlRequest, runtime: Util.RuntimeOptions): GetWithholdSignPageUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.externalAgreementNo)) {
    body['ExternalAgreementNo'] = request.externalAgreementNo;
  }
  if (!Util.isUnset(request.identityParameters)) {
    body['IdentityParameters'] = request.identityParameters;
  }
  if (!Util.isUnset(request.merchantId)) {
    body['MerchantId'] = request.merchantId;
  }
  if (!Util.isUnset(request.merchantServiceDescription)) {
    body['MerchantServiceDescription'] = request.merchantServiceDescription;
  }
  if (!Util.isUnset(request.merchantServiceName)) {
    body['MerchantServiceName'] = request.merchantServiceName;
  }
  if (!Util.isUnset(request.notifyUrl)) {
    body['NotifyUrl'] = request.notifyUrl;
  }
  if (!Util.isUnset(request.outRequestNo)) {
    body['OutRequestNo'] = request.outRequestNo;
  }
  if (!Util.isUnset(request.returnUrl)) {
    body['ReturnUrl'] = request.returnUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWithholdSignPageUrl',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request GetWithholdSignPageUrlRequest
 * @return GetWithholdSignPageUrlResponse
 */
async function getWithholdSignPageUrl(request: GetWithholdSignPageUrlRequest): GetWithholdSignPageUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getWithholdSignPageUrlWithOptions(request, runtime);
}

model GiveUserPointRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='1000'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******01'),
  extInfo?: map[string]any(name='ExtInfo', example='{}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='20211212******1746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  targetBizUid?: string(name='TargetBizUid', description='This parameter is required.', example='22******45'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******67'),
  title?: string(name='Title', description='This parameter is required.'),
}

model GiveUserPointShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='1000'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******01'),
  extInfoShrink?: string(name='ExtInfo', example='{}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='20211212******1746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  targetBizUid?: string(name='TargetBizUid', description='This parameter is required.', example='22******45'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******67'),
  title?: string(name='Title', description='This parameter is required.'),
}

model GiveUserPointResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    accountId?: string(name='AccountId', example='11******18'),
    action?: string(name='Action', example='""'),
    amount?: long(name='Amount', example='1000'),
    bizId?: string(name='BizId', example='LMALL20******002'),
    bizUid?: string(name='BizUid', example='22******67'),
    description?: string(name='Description'),
    extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
    idempotentId?: string(name='IdempotentId', example='20211212******1746-1202'),
    name?: string(name='Name'),
    recordId?: string(name='RecordId', example='""'),
    rest?: long(name='Rest', example='2000'),
    ruleId?: string(name='RuleId', example='136'),
    status?: string(name='Status', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='0854F82D-7912-52A1-8EF5-2D1662C50C36'),
}

model GiveUserPointResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GiveUserPointResponseBody(name='body'),
}

/**
 * @summary 用户间赠送积分
 *
 * @param tmpReq GiveUserPointRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GiveUserPointResponse
 */
async function giveUserPointWithOptions(tmpReq: GiveUserPointRequest, runtime: Util.RuntimeOptions): GiveUserPointResponse {
  Util.validateModel(tmpReq);
  var request = new GiveUserPointShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.amount)) {
    query['Amount'] = request.amount;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.idempotentId)) {
    query['IdempotentId'] = request.idempotentId;
  }
  if (!Util.isUnset(request.message)) {
    query['Message'] = request.message;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.targetBizUid)) {
    query['TargetBizUid'] = request.targetBizUid;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GiveUserPoint',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 用户间赠送积分
 *
 * @param request GiveUserPointRequest
 * @return GiveUserPointResponse
 */
async function giveUserPoint(request: GiveUserPointRequest): GiveUserPointResponse {
  var runtime = new Util.RuntimeOptions{};
  return giveUserPointWithOptions(request, runtime);
}

model GrantPromotionToUserRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211118****'),
  expireSeconds?: long(name='ExpireSeconds', example='2554265'),
  grantMode?: string(name='GrantMode', example='NORMAL'),
  grantWay?: string(name='GrantWay', example='latour2'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='20211212211381431746-1202'),
  promotionId?: string(name='PromotionId', description='This parameter is required.', example='66482394364783****'),
  securityCode?: string(name='SecurityCode', example='6aa6ea6af00b453eafc3128d41858bf6'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.'),
  body?: map[string]any(name='body'),
}

model GrantPromotionToUserShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211118****'),
  expireSeconds?: long(name='ExpireSeconds', example='2554265'),
  grantMode?: string(name='GrantMode', example='NORMAL'),
  grantWay?: string(name='GrantWay', example='latour2'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='20211212211381431746-1202'),
  promotionId?: string(name='PromotionId', description='This parameter is required.', example='66482394364783****'),
  securityCode?: string(name='SecurityCode', example='6aa6ea6af00b453eafc3128d41858bf6'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.'),
  bodyShrink?: string(name='body'),
}

model GrantPromotionToUserResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='success'),
  model?: {
    effectiveEndTime?: long(name='EffectiveEndTime', example='12322333232'),
    effectiveStartTime?: long(name='EffectiveStartTime', example='123243444'),
    promotionInstanceId?: string(name='PromotionInstanceId', example='123456'),
    subBizCode?: string(name='SubBizCode', example='ef2b8********f824830b7e55a0dc5'),
    success?: boolean(name='Success', example='true'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
}

model GrantPromotionToUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GrantPromotionToUserResponseBody(name='body'),
}

/**
 * @summary 给用户发放优惠权益
 *
 * @param tmpReq GrantPromotionToUserRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GrantPromotionToUserResponse
 */
async function grantPromotionToUserWithOptions(tmpReq: GrantPromotionToUserRequest, runtime: Util.RuntimeOptions): GrantPromotionToUserResponse {
  Util.validateModel(tmpReq);
  var request = new GrantPromotionToUserShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.body)) {
    request.bodyShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.body, 'body', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.expireSeconds)) {
    query['ExpireSeconds'] = request.expireSeconds;
  }
  if (!Util.isUnset(request.grantMode)) {
    query['GrantMode'] = request.grantMode;
  }
  if (!Util.isUnset(request.grantWay)) {
    query['GrantWay'] = request.grantWay;
  }
  if (!Util.isUnset(request.idempotentId)) {
    query['IdempotentId'] = request.idempotentId;
  }
  if (!Util.isUnset(request.promotionId)) {
    query['PromotionId'] = request.promotionId;
  }
  if (!Util.isUnset(request.securityCode)) {
    query['SecurityCode'] = request.securityCode;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bodyShrink)) {
    body['body'] = request.bodyShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GrantPromotionToUser',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 给用户发放优惠权益
 *
 * @param request GrantPromotionToUserRequest
 * @return GrantPromotionToUserResponse
 */
async function grantPromotionToUser(request: GrantPromotionToUserRequest): GrantPromotionToUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return grantPromotionToUserWithOptions(request, runtime);
}

model GrantUserPointRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='1000'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='202112******31746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******3527'),
  title?: string(name='Title', description='This parameter is required.'),
}

model GrantUserPointShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='1000'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  extInfoShrink?: string(name='ExtInfo', example='{"key":"value"}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='202112******31746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******3527'),
  title?: string(name='Title', description='This parameter is required.'),
}

model GrantUserPointResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    accountId?: string(name='AccountId', example='69******45'),
    action?: string(name='Action'),
    amount?: long(name='Amount', example='1000'),
    bizId?: string(name='BizId', example='LMALL20******002'),
    bizUid?: string(name='BizUid', example='22******3527'),
    description?: string(name='Description'),
    extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
    idempotentId?: string(name='IdempotentId', example='202112******31746-1202'),
    name?: string(name='Name'),
    recordId?: string(name='RecordId', example='6529'),
    rest?: long(name='Rest', example='5000'),
    ruleId?: string(name='RuleId', example='136'),
    status?: string(name='Status'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
}

model GrantUserPointResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GrantUserPointResponseBody(name='body'),
}

/**
 * @summary 发放用户积分
 *
 * @param tmpReq GrantUserPointRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GrantUserPointResponse
 */
async function grantUserPointWithOptions(tmpReq: GrantUserPointRequest, runtime: Util.RuntimeOptions): GrantUserPointResponse {
  Util.validateModel(tmpReq);
  var request = new GrantUserPointShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.amount)) {
    query['Amount'] = request.amount;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.idempotentId)) {
    query['IdempotentId'] = request.idempotentId;
  }
  if (!Util.isUnset(request.message)) {
    query['Message'] = request.message;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GrantUserPoint',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 发放用户积分
 *
 * @param request GrantUserPointRequest
 * @return GrantUserPointResponse
 */
async function grantUserPoint(request: GrantUserPointRequest): GrantUserPointResponse {
  var runtime = new Util.RuntimeOptions{};
  return grantUserPointWithOptions(request, runtime);
}

model InitApplyRefundRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizClaimType?: int32(name='BizClaimType', description='This parameter is required.', example='1'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='182******062'),
  goodsStatus?: int32(name='GoodsStatus', description='This parameter is required.', example='6'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='51******13'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model InitApplyRefundResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  initApplyRefundData?: {
    bizClaimType?: int32(name='BizClaimType', example='1'),
    mainOrderRefund?: boolean(name='MainOrderRefund'),
    maxRefundFeeData?: {
      maxRefundFee?: int32(name='MaxRefundFee', example='100'),
      minRefundFee?: int32(name='MinRefundFee', example='10'),
    }(name='MaxRefundFeeData'),
    refundReasonList?: {
      refundReasonList?: [ 
      {
        proofRequired?: boolean(name='ProofRequired', example='false'),
        reasonTextId?: long(name='ReasonTextId', example='500003'),
        reasonTips?: string(name='ReasonTips'),
        refundDescRequired?: boolean(name='RefundDescRequired', example='true'),
      }
    ](name='RefundReasonList')
    }(name='RefundReasonList'),
  }(name='InitApplyRefundData'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='B7E4EF89-DBC3-5CD0-9993-02D8C13E7177'),
  subLmOrderId?: string(name='SubLmOrderId', example='38******75'),
}

model InitApplyRefundResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InitApplyRefundResponseBody(name='body'),
}

/**
 * @param request InitApplyRefundRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InitApplyRefundResponse
 */
async function initApplyRefundWithOptions(request: InitApplyRefundRequest, runtime: Util.RuntimeOptions): InitApplyRefundResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizClaimType)) {
    query['BizClaimType'] = request.bizClaimType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.goodsStatus)) {
    query['GoodsStatus'] = request.goodsStatus;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    query['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InitApplyRefund',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request InitApplyRefundRequest
 * @return InitApplyRefundResponse
 */
async function initApplyRefund(request: InitApplyRefundRequest): InitApplyRefundResponse {
  var runtime = new Util.RuntimeOptions{};
  return initApplyRefundWithOptions(request, runtime);
}

model InitApplyRefundWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2022***001'),
  disputeId?: long(name='DisputeId', example='14244***33071'),
  refundCode?: int32(name='RefundCode', description='This parameter is required.', example='1'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='711***981'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='334***641'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='u***001'),
}

model InitApplyRefundWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    bizClaimType?: int32(name='BizClaimType', example='1'),
    lmOrderId?: string(name='LmOrderId', example='711***981'),
    mainOrderRefund?: boolean(name='MainOrderRefund', example='false'),
    maxRefundFeeData?: {
      maxRefundFee?: long(name='MaxRefundFee', example='10'),
      minRefundFee?: long(name='MinRefundFee', example='10'),
    }(name='MaxRefundFeeData'),
    refundReasonList?: [ 
      {
        proofRequired?: boolean(name='ProofRequired', example='false'),
        reasonTextId?: long(name='ReasonTextId', example='12323'),
        reasonTips?: string(name='ReasonTips'),
        refundDescRequired?: boolean(name='RefundDescRequired', example='false'),
      }
    ](name='RefundReasonList'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber', example='10'),
  pageSize?: long(name='PageSize', description='pageSize', example='1'),
  requestId?: string(name='RequestId', example='5BE45C12-C37***81-A8E9C61401AB'),
  subCode?: string(name='SubCode', example='201'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='10'),
}

model InitApplyRefundWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InitApplyRefundWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request InitApplyRefundWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InitApplyRefundWithDesignatedTbUidResponse
 */
async function initApplyRefundWithDesignatedTbUidWithOptions(request: InitApplyRefundWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): InitApplyRefundWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.disputeId)) {
    body['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.refundCode)) {
    body['RefundCode'] = request.refundCode;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    body['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InitApplyRefundWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request InitApplyRefundWithDesignatedTbUidRequest
 * @return InitApplyRefundWithDesignatedTbUidResponse
 */
async function initApplyRefundWithDesignatedTbUid(request: InitApplyRefundWithDesignatedTbUidRequest): InitApplyRefundWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return initApplyRefundWithDesignatedTbUidWithOptions(request, runtime);
}

model InitModifyRefundRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizClaimType?: int32(name='BizClaimType', description='This parameter is required.', example='1'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL202****11224'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='22112****2411'),
  disputeId?: long(name='DisputeId', example='14244******33071'),
  goodsStatus?: int32(name='GoodsStatus', description='This parameter is required.', example='1'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='23******85'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='221122411****231'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model InitModifyRefundResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  initApplyRefundData?: {
    bizClaimType?: int32(name='BizClaimType', example='3'),
    mainOrderRefund?: boolean(name='MainOrderRefund'),
    maxRefundFeeData?: {
      maxRefundFee?: int32(name='MaxRefundFee'),
      minRefundFee?: int32(name='MinRefundFee', example='10'),
    }(name='MaxRefundFeeData'),
    refundReasonList?: {
      refundReasonList?: [ 
      {
        proofRequired?: boolean(name='ProofRequired', example='false'),
        reasonTextId?: long(name='ReasonTextId', example='500003'),
        reasonTips?: string(name='ReasonTips'),
        refundDescRequired?: boolean(name='RefundDescRequired', example='true'),
      }
    ](name='RefundReasonList')
    }(name='RefundReasonList'),
  }(name='InitApplyRefundData'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='E090F1A0-7****454-5F36-933C-E6332CE2'),
  subLmOrderId?: string(name='SubLmOrderId', example='23******85'),
}

model InitModifyRefundResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InitModifyRefundResponseBody(name='body'),
}

/**
 * @summary 初始化修改申请方案
 *
 * @param request InitModifyRefundRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InitModifyRefundResponse
 */
async function initModifyRefundWithOptions(request: InitModifyRefundRequest, runtime: Util.RuntimeOptions): InitModifyRefundResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizClaimType)) {
    query['BizClaimType'] = request.bizClaimType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.disputeId)) {
    query['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.goodsStatus)) {
    query['GoodsStatus'] = request.goodsStatus;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    query['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'InitModifyRefund',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 初始化修改申请方案
 *
 * @param request InitModifyRefundRequest
 * @return InitModifyRefundResponse
 */
async function initModifyRefund(request: InitModifyRefundRequest): InitModifyRefundResponse {
  var runtime = new Util.RuntimeOptions{};
  return initModifyRefundWithOptions(request, runtime);
}

model InitModifyRefundWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2022***001'),
  disputeId?: long(name='DisputeId', example='20196***0240'),
  refundCode?: int32(name='RefundCode', description='This parameter is required.', example='1'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='742***206'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='345***211'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='u***002'),
}

model InitModifyRefundWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    bizClaimType?: int32(name='BizClaimType', example='1'),
    lmOrderId?: string(name='LmOrderId', example='742***206'),
    mainOrderRefund?: boolean(name='MainOrderRefund', example='false'),
    maxRefundFeeData?: {
      maxRefundFee?: long(name='MaxRefundFee', example='100'),
      minRefundFee?: long(name='MinRefundFee', example='10'),
    }(name='MaxRefundFeeData'),
    refundReasonList?: [ 
      {
        proofRequired?: boolean(name='ProofRequired', example='false'),
        reasonTextId?: long(name='ReasonTextId', example='12323'),
        reasonTips?: string(name='ReasonTips'),
        refundDescRequired?: boolean(name='RefundDescRequired', example='false'),
      }
    ](name='RefundReasonList'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='1'),
  requestId?: string(name='RequestId', example='6EF1D7F7-64***EF5-5F004D3D4247'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model InitModifyRefundWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InitModifyRefundWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request InitModifyRefundWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InitModifyRefundWithDesignatedTbUidResponse
 */
async function initModifyRefundWithDesignatedTbUidWithOptions(request: InitModifyRefundWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): InitModifyRefundWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.disputeId)) {
    body['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.refundCode)) {
    body['RefundCode'] = request.refundCode;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    body['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InitModifyRefundWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request InitModifyRefundWithDesignatedTbUidRequest
 * @return InitModifyRefundWithDesignatedTbUidResponse
 */
async function initModifyRefundWithDesignatedTbUid(request: InitModifyRefundWithDesignatedTbUidRequest): InitModifyRefundWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return initModifyRefundWithDesignatedTbUidWithOptions(request, runtime);
}

model ListActivityAtmosphereRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  activityId?: string(name='ActivityId', example='673'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  gameId?: string(name='GameId', example='671******37088'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  status?: string(name='Status', example='""'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******364'),
}

model ListActivityAtmosphereResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      bizUid?: string(name='BizUid', example='22******37'),
      message?: string(name='Message', example='""'),
      status?: string(name='Status', example='""'),
    }
  ](name='Model'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  requestId?: string(name='RequestId', example='E090F1A0-7454-5F36-933C-E6332CE2****'),
  totalCount?: long(name='TotalCount', example='12'),
}

model ListActivityAtmosphereResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListActivityAtmosphereResponseBody(name='body'),
}

/**
 * @summary 查询玩法氛围数据
 *
 * @param request ListActivityAtmosphereRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListActivityAtmosphereResponse
 */
async function listActivityAtmosphereWithOptions(request: ListActivityAtmosphereRequest, runtime: Util.RuntimeOptions): ListActivityAtmosphereResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListActivityAtmosphere',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询玩法氛围数据
 *
 * @param request ListActivityAtmosphereRequest
 * @return ListActivityAtmosphereResponse
 */
async function listActivityAtmosphere(request: ListActivityAtmosphereRequest): ListActivityAtmosphereResponse {
  var runtime = new Util.RuntimeOptions{};
  return listActivityAtmosphereWithOptions(request, runtime);
}

model ListActivityGameInfoRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  activityId?: string(name='ActivityId', example='673'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  endTime?: long(name='EndTime', example='1639104750323'),
  gameId?: string(name='GameId', example='6717******67874'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  startTime?: long(name='StartTime', example='1638104750323'),
  status?: string(name='Status', example='""'),
  statuses?: string(name='Statuses', example='[]'),
  subType?: string(name='SubType', example='""'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******263'),
  type?: string(name='Type', example='""'),
}

model ListActivityGameInfoResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
      gameShowInfo?: string(name='GameShowInfo', example='""'),
    }
  ](name='Model'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  requestId?: string(name='RequestId', example='F1339E71-CB73-5440-BD39-1C98A8ED50E3'),
  totalCount?: long(name='TotalCount', example='19'),
}

model ListActivityGameInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListActivityGameInfoResponseBody(name='body'),
}

/**
 * @summary 查询玩法信息列表
 *
 * @param request ListActivityGameInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListActivityGameInfoResponse
 */
async function listActivityGameInfoWithOptions(request: ListActivityGameInfoRequest, runtime: Util.RuntimeOptions): ListActivityGameInfoResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListActivityGameInfo',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询玩法信息列表
 *
 * @param request ListActivityGameInfoRequest
 * @return ListActivityGameInfoResponse
 */
async function listActivityGameInfo(request: ListActivityGameInfoRequest): ListActivityGameInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return listActivityGameInfoWithOptions(request, runtime);
}

model ListItemActivitiesRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  itemIds?: map[string]any(name='ItemIds', example='[664148141***,663735776***]'),
  lmItemIds?: map[string]any(name='LmItemIds', example='[\\\\"10000230-60716881****\\\\",\\\\"10000021-59183191****\\\\"]'),
}

model ListItemActivitiesShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  itemIdsShrink?: string(name='ItemIds', example='[664148141***,663735776***]'),
  lmItemIdsShrink?: string(name='LmItemIds', example='[\\\\"10000230-60716881****\\\\",\\\\"10000021-59183191****\\\\"]'),
}

model ListItemActivitiesResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmItemActivityModelList?: {
    lmItemActivityModel?: [ 
    {
      itemId?: long(name='ItemId', example='599520******'),
      lmActivityPopModel?: {
        bizId?: string(name='BizId', example='LMALL20******001'),
        displayDate?: string(name='DisplayDate', example='2022-03-31 14:25:00'),
        endDate?: string(name='EndDate', example='2022-04-04 00:00:00'),
        extInfo?: map[string]any(name='ExtInfo'),
        id?: long(name='Id', example='666'),
        startDate?: string(name='StartDate', example='2022-04-01 00:00:00'),
        subBizCode?: string(name='SubBizCode', example='4309074a******9d626669eaa7f7c'),
        title?: string(name='Title'),
      }(name='LmActivityPopModel'),
      lmItemId?: string(name='LmItemId', example='10000055-599520******'),
    }
  ](name='LmItemActivityModel')
  }(name='LmItemActivityModelList'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
}

model ListItemActivitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListItemActivitiesResponseBody(name='body'),
}

/**
 * @param tmpReq ListItemActivitiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListItemActivitiesResponse
 */
async function listItemActivitiesWithOptions(tmpReq: ListItemActivitiesRequest, runtime: Util.RuntimeOptions): ListItemActivitiesResponse {
  Util.validateModel(tmpReq);
  var request = new ListItemActivitiesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.itemIds)) {
    request.itemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.itemIds, 'ItemIds', 'json');
  }
  if (!Util.isUnset(tmpReq.lmItemIds)) {
    request.lmItemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lmItemIds, 'LmItemIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.itemIdsShrink)) {
    query['ItemIds'] = request.itemIdsShrink;
  }
  if (!Util.isUnset(request.lmItemIdsShrink)) {
    query['LmItemIds'] = request.lmItemIdsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListItemActivities',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ListItemActivitiesRequest
 * @return ListItemActivitiesResponse
 */
async function listItemActivities(request: ListItemActivitiesRequest): ListItemActivitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listItemActivitiesWithOptions(request, runtime);
}

model ListUserGameProcessRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  activityId?: string(name='ActivityId', example='673'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  endTime?: long(name='EndTime', example='1639017538838'),
  gameId?: string(name='GameId', example='67347******4689'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  startTime?: long(name='StartTime', example='1637958044395'),
  status?: string(name='Status', example='""'),
  statuses?: string(name='Statuses', example='[]'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******352'),
  type?: string(name='Type', example='""'),
}

model ListUserGameProcessResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      activityId?: string(name='ActivityId', example='673'),
      createTime?: long(name='CreateTime', example='1638451941000'),
      currentShowContent?: string(name='CurrentShowContent', example='""'),
      currentStepId?: string(name='CurrentStepId', example='""'),
      currentStepStatus?: string(name='CurrentStepStatus', example='""'),
      desc?: string(name='Desc', example='""'),
      extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
      gameId?: string(name='GameId', example='67347******4689'),
      modifyTime?: long(name='ModifyTime', example='1642662319000'),
      name?: string(name='Name', example='""'),
      processId?: string(name='ProcessId', example='1916'),
      routeId?: string(name='RouteId', example='619'),
      status?: string(name='Status', example='""'),
      type?: string(name='Type', example='""'),
    }
  ](name='Model'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  requestId?: string(name='RequestId', example='07127DEC-D093-54B5-884A-29D49CBE95A5'),
  totalCount?: long(name='TotalCount', example='12'),
}

model ListUserGameProcessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserGameProcessResponseBody(name='body'),
}

/**
 * @summary 查询用户的玩法进度列表
 *
 * @param request ListUserGameProcessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserGameProcessResponse
 */
async function listUserGameProcessWithOptions(request: ListUserGameProcessRequest, runtime: Util.RuntimeOptions): ListUserGameProcessResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserGameProcess',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户的玩法进度列表
 *
 * @param request ListUserGameProcessRequest
 * @return ListUserGameProcessResponse
 */
async function listUserGameProcess(request: ListUserGameProcessRequest): ListUserGameProcessResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserGameProcessWithOptions(request, runtime);
}

model ListUserPointRecordsRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  endTime?: long(name='EndTime', description='This parameter is required.', example='1638958044395'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  pointAction?: string(name='PointAction', example='""'),
  pointActions?: string(name='PointActions'),
  recordId?: string(name='RecordId', example='""'),
  ruleId?: string(name='RuleId', example='136'),
  startTime?: long(name='StartTime', description='This parameter is required.', example='1640958044395'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******67'),
}

model ListUserPointRecordsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      action?: string(name='Action'),
      amount?: long(name='Amount', example='1000'),
      createTime?: long(name='CreateTime', example='1638451941000'),
      description?: string(name='Description'),
      extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
      idempotentId?: string(name='IdempotentId', example='20211215******8117-1200'),
      modifyTime?: long(name='ModifyTime', example='1648451941000'),
      name?: string(name='Name'),
      recordId?: string(name='RecordId', example='5******4'),
      rest?: long(name='Rest'),
      ruleId?: string(name='RuleId', example='710'),
      status?: string(name='Status', example='""'),
    }
  ](name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='199DFDCB-2225-5748-8D1A-528DD6C76563'),
  totalCount?: long(name='TotalCount', example='19'),
}

model ListUserPointRecordsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserPointRecordsResponseBody(name='body'),
}

/**
 * @summary 查询用户积分记录列表
 *
 * @param request ListUserPointRecordsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserPointRecordsResponse
 */
async function listUserPointRecordsWithOptions(request: ListUserPointRecordsRequest, runtime: Util.RuntimeOptions): ListUserPointRecordsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserPointRecords',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户积分记录列表
 *
 * @param request ListUserPointRecordsRequest
 * @return ListUserPointRecordsResponse
 */
async function listUserPointRecords(request: ListUserPointRecordsRequest): ListUserPointRecordsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserPointRecordsWithOptions(request, runtime);
}

model ModifyBasicAndBizItemsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2***100001'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='65671280****'),
      lmItemId?: string(name='LmItemId', example='10000035-61936646****'),
      skuList?: [ 
        {
          benefitId?: string(name='BenefitId', example='2021090800502200000086****'),
          points?: long(name='Points', example='1999'),
          pointsAmount?: long(name='PointsAmount', example='0'),
          priceCent?: long(name='PriceCent', example='2790'),
          quantity?: int32(name='Quantity', example='2000'),
          skuId?: long(name='SkuId', example='472461998****'),
          statusAction?: long(name='StatusAction', example='1'),
          supplierPrice?: long(name='SupplierPrice', example='2790'),
        }
      ](name='SkuList'),
    }
  ](name='ItemList', description='This parameter is required.'),
  subBizId?: string(name='SubBizId', example='f4279b7cbdfc46d4b7566****'),
}

model ModifyBasicAndBizItemsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  failedItemList?: {
    item?: [ 
    {
      itemId?: long(name='ItemId', example='65305223****'),
      lmItemId?: string(name='LmItemId', example='10000102-65305223****'),
      skuIdList?: {
        sku?: [ string ](name='Sku')
      }(name='SkuIdList'),
    }
  ](name='Item')
  }(name='FailedItemList'),
  message?: string(name='Message', example='The specified parameter %s value is not valid.'),
  requestId?: string(name='RequestId', example='F957A835-87CE-5E5F-B0A9-A66B081E****'),
}

model ModifyBasicAndBizItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBasicAndBizItemsResponseBody(name='body'),
}

/**
 * @param request ModifyBasicAndBizItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBasicAndBizItemsResponse
 */
async function modifyBasicAndBizItemsWithOptions(request: ModifyBasicAndBizItemsRequest, runtime: Util.RuntimeOptions): ModifyBasicAndBizItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.subBizId)) {
    query['SubBizId'] = request.subBizId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemList)) {
    body['ItemList'] = request.itemList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBasicAndBizItems',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyBasicAndBizItemsRequest
 * @return ModifyBasicAndBizItemsResponse
 */
async function modifyBasicAndBizItems(request: ModifyBasicAndBizItemsRequest): ModifyBasicAndBizItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBasicAndBizItemsWithOptions(request, runtime);
}

model ModifyBasicItemSupplierPriceRequest {
  bizId?: string(name='BizId', example='LMALL20******001'),
  lmItemId?: string(name='LmItemId', example='10000****-6193664*****'),
  lmShopId?: long(name='LmShopId', example='1002****'),
  skuId?: long(name='SkuId', example='490073602****'),
  supplierPrice?: long(name='SupplierPrice', example='4800'),
}

model ModifyBasicItemSupplierPriceResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  model?: boolean(name='Model', example='true'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D08E8'),
}

model ModifyBasicItemSupplierPriceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBasicItemSupplierPriceResponseBody(name='body'),
}

/**
 * @summary 修改基础库商品供货价
 *
 * @param request ModifyBasicItemSupplierPriceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBasicItemSupplierPriceResponse
 */
async function modifyBasicItemSupplierPriceWithOptions(request: ModifyBasicItemSupplierPriceRequest, runtime: Util.RuntimeOptions): ModifyBasicItemSupplierPriceResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.lmShopId)) {
    query['LmShopId'] = request.lmShopId;
  }
  if (!Util.isUnset(request.skuId)) {
    query['SkuId'] = request.skuId;
  }
  if (!Util.isUnset(request.supplierPrice)) {
    query['SupplierPrice'] = request.supplierPrice;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBasicItemSupplierPrice',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改基础库商品供货价
 *
 * @param request ModifyBasicItemSupplierPriceRequest
 * @return ModifyBasicItemSupplierPriceResponse
 */
async function modifyBasicItemSupplierPrice(request: ModifyBasicItemSupplierPriceRequest): ModifyBasicItemSupplierPriceResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBasicItemSupplierPriceWithOptions(request, runtime);
}

model ModifyBizItemsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211119****'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='62553137****'),
      lmItemId?: string(name='LmItemId', example='10000035-61936646****'),
      skuList?: [ 
        {
          benefitId?: string(name='BenefitId', example='202108181714875327'),
          points?: long(name='Points', example='1999'),
          pointsAmount?: long(name='PointsAmount', example='1290'),
          priceCent?: long(name='PriceCent', example='2790'),
          quantity?: int32(name='Quantity', example='20000'),
          skuId?: long(name='SkuId', example='472266643****'),
          statusAction?: long(name='StatusAction', example='1'),
        }
      ](name='SkuList'),
    }
  ](name='ItemList', description='This parameter is required.'),
  subBizId?: string(name='SubBizId', example='12c6b6e98bb34475bcd38df73****'),
}

model ModifyBizItemsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  failedItemList?: {
    item?: [ 
    {
      itemId?: long(name='ItemId', example='65305223****'),
      lmItemId?: string(name='LmItemId', example='10000102-65305223****'),
      skuIdList?: {
        sku?: [ string ](name='Sku')
      }(name='SkuIdList'),
    }
  ](name='Item')
  }(name='FailedItemList'),
  message?: string(name='Message', example='SUCCESS'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='204F5C60-0B34-5718-AF93-9BD26B37****'),
  totalCount?: int32(name='TotalCount', example='19'),
}

model ModifyBizItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyBizItemsResponseBody(name='body'),
}

/**
 * @param request ModifyBizItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyBizItemsResponse
 */
async function modifyBizItemsWithOptions(request: ModifyBizItemsRequest, runtime: Util.RuntimeOptions): ModifyBizItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.subBizId)) {
    query['SubBizId'] = request.subBizId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemList)) {
    body['ItemList'] = request.itemList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyBizItems',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyBizItemsRequest
 * @return ModifyBizItemsResponse
 */
async function modifyBizItems(request: ModifyBizItemsRequest): ModifyBizItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyBizItemsWithOptions(request, runtime);
}

model ModifyItemLimitRuleRequest {
  beginTime?: long(name='BeginTime', example='1639539460838'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  endTime?: long(name='EndTime', example='1648483200000'),
  itemId?: long(name='ItemId', example='655******148'),
  lmActivityId?: long(name='LmActivityId', example='679'),
  lmItemId?: string(name='LmItemId', example='10000055-******09839'),
  ruleId?: long(name='RuleId', description='This parameter is required.', example='136'),
  ruleType?: int32(name='RuleType'),
  subBizCode?: string(name='SubBizCode', example='5ab43d1******41abdd23629bed001a0'),
  upperNum?: int32(name='UpperNum'),
}

model ModifyItemLimitRuleResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: boolean(name='Model'),
  requestId?: string(name='RequestId', example='BCB20091-68E0-5D29-BE90-125954BB58E2'),
}

model ModifyItemLimitRuleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyItemLimitRuleResponseBody(name='body'),
}

/**
 * @param request ModifyItemLimitRuleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyItemLimitRuleResponse
 */
async function modifyItemLimitRuleWithOptions(request: ModifyItemLimitRuleRequest, runtime: Util.RuntimeOptions): ModifyItemLimitRuleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.beginTime)) {
    query['BeginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmActivityId)) {
    query['LmActivityId'] = request.lmActivityId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.ruleType)) {
    query['RuleType'] = request.ruleType;
  }
  if (!Util.isUnset(request.subBizCode)) {
    query['SubBizCode'] = request.subBizCode;
  }
  if (!Util.isUnset(request.upperNum)) {
    query['UpperNum'] = request.upperNum;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyItemLimitRule',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyItemLimitRuleRequest
 * @return ModifyItemLimitRuleResponse
 */
async function modifyItemLimitRule(request: ModifyItemLimitRuleRequest): ModifyItemLimitRuleResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyItemLimitRuleWithOptions(request, runtime);
}

model ModifyOrderDeliveryAddressRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20190325****'),
  deliveryAddress?: string(name='DeliveryAddress', description='This parameter is required.'),
  extJson?: string(name='ExtJson', example='{\\\\"mobileNo\\\\":\\\\"123****8965\\\\"}'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.', example='53396****'),
}

model ModifyOrderDeliveryAddressResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='The specified parameter %s value is not valid.'),
  model?: {
    resultInfo?: map[string]any(name='ResultInfo'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='5E2D59BA-4EB0-45C4-A0D7-D98C1A4B****'),
  subCode?: string(name='SubCode', example='1004'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='12'),
}

model ModifyOrderDeliveryAddressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyOrderDeliveryAddressResponseBody(name='body'),
}

/**
 * @param request ModifyOrderDeliveryAddressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyOrderDeliveryAddressResponse
 */
async function modifyOrderDeliveryAddressWithOptions(request: ModifyOrderDeliveryAddressRequest, runtime: Util.RuntimeOptions): ModifyOrderDeliveryAddressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.deliveryAddress)) {
    query['DeliveryAddress'] = request.deliveryAddress;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyOrderDeliveryAddress',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyOrderDeliveryAddressRequest
 * @return ModifyOrderDeliveryAddressResponse
 */
async function modifyOrderDeliveryAddress(request: ModifyOrderDeliveryAddressRequest): ModifyOrderDeliveryAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyOrderDeliveryAddressWithOptions(request, runtime);
}

model ModifyRefundRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  applyReasonTextId?: long(name='ApplyReasonTextId', example='500325'),
  applyRefundCount?: int32(name='ApplyRefundCount', example='1'),
  applyRefundFee?: long(name='ApplyRefundFee', description='This parameter is required.', example='790'),
  bizClaimType?: int32(name='BizClaimType', description='This parameter is required.', example='1'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='220635******232'),
  disputeId?: long(name='DisputeId', example='14244******33071'),
  goodsStatus?: int32(name='GoodsStatus', example='4'),
  leaveMessage?: string(name='LeaveMessage'),
  leavePictureList?: [ 
    {
      desc?: string(name='Desc'),
      picture?: string(name='Picture', example='https://lm-dk.oss-cn-hangzhou.aliyuncs.com/1635738731345.png'),
    }
  ](name='LeavePictureList'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='38******75'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='220635******232'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model ModifyRefundResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  refundApplicationData?: {
    disputeStatus?: int32(name='DisputeStatus', example='1'),
    disputeType?: int32(name='DisputeType', example='0'),
    subLmOrderId?: string(name='SubLmOrderId', example='37******31'),
  }(name='RefundApplicationData'),
  requestId?: string(name='RequestId', example='A7BE4356-7F92-533E-A31B-****2D67'),
}

model ModifyRefundResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyRefundResponseBody(name='body'),
}

/**
 * @summary 修改申请
 *
 * @param request ModifyRefundRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyRefundResponse
 */
async function modifyRefundWithOptions(request: ModifyRefundRequest, runtime: Util.RuntimeOptions): ModifyRefundResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.applyReasonTextId)) {
    query['ApplyReasonTextId'] = request.applyReasonTextId;
  }
  if (!Util.isUnset(request.applyRefundCount)) {
    query['ApplyRefundCount'] = request.applyRefundCount;
  }
  if (!Util.isUnset(request.applyRefundFee)) {
    query['ApplyRefundFee'] = request.applyRefundFee;
  }
  if (!Util.isUnset(request.bizClaimType)) {
    query['BizClaimType'] = request.bizClaimType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.disputeId)) {
    query['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.goodsStatus)) {
    query['GoodsStatus'] = request.goodsStatus;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    query['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.leaveMessage)) {
    body['LeaveMessage'] = request.leaveMessage;
  }
  if (!Util.isUnset(request.leavePictureList)) {
    body['LeavePictureList'] = request.leavePictureList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyRefund',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改申请
 *
 * @param request ModifyRefundRequest
 * @return ModifyRefundResponse
 */
async function modifyRefund(request: ModifyRefundRequest): ModifyRefundResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyRefundWithOptions(request, runtime);
}

model ModifyRefundWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.'),
  disputeId?: long(name='DisputeId'),
  goodsStatus?: int32(name='GoodsStatus', description='This parameter is required.'),
  message?: string(name='Message'),
  proofs?: [ 
    {
      messagePic?: string(name='MessagePic'),
      messagePicDesc?: string(name='MessagePicDesc'),
    }
  ](name='Proofs'),
  reasonId?: long(name='ReasonId', description='This parameter is required.'),
  refundCode?: int32(name='RefundCode', description='This parameter is required.'),
  refundCount?: int32(name='RefundCount'),
  refundFee?: long(name='RefundFee', description='This parameter is required.'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.'),
  tbUserId?: long(name='TbUserId'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.'),
}

model ModifyRefundWithDesignatedTbUidShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.'),
  disputeId?: long(name='DisputeId'),
  goodsStatus?: int32(name='GoodsStatus', description='This parameter is required.'),
  message?: string(name='Message'),
  proofsShrink?: string(name='Proofs'),
  reasonId?: long(name='ReasonId', description='This parameter is required.'),
  refundCode?: int32(name='RefundCode', description='This parameter is required.'),
  refundCount?: int32(name='RefundCount'),
  refundFee?: long(name='RefundFee', description='This parameter is required.'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.'),
  tbUserId?: long(name='TbUserId'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.'),
}

model ModifyRefundWithDesignatedTbUidResponseBody = {
  code?: string(name='Code'),
  logsId?: string(name='LogsId'),
  message?: string(name='Message'),
  model?: {
    disputeId?: long(name='DisputeId'),
    disputeStatus?: int32(name='DisputeStatus'),
    disputeType?: int32(name='DisputeType'),
    subLmOrderId?: string(name='SubLmOrderId'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  subCode?: string(name='SubCode'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success'),
  totalCount?: long(name='TotalCount'),
}

model ModifyRefundWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyRefundWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param tmpReq ModifyRefundWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyRefundWithDesignatedTbUidResponse
 */
async function modifyRefundWithDesignatedTbUidWithOptions(tmpReq: ModifyRefundWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): ModifyRefundWithDesignatedTbUidResponse {
  Util.validateModel(tmpReq);
  var request = new ModifyRefundWithDesignatedTbUidShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.proofs)) {
    request.proofsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.proofs, 'Proofs', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.disputeId)) {
    body['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.goodsStatus)) {
    body['GoodsStatus'] = request.goodsStatus;
  }
  if (!Util.isUnset(request.message)) {
    body['Message'] = request.message;
  }
  if (!Util.isUnset(request.proofsShrink)) {
    body['Proofs'] = request.proofsShrink;
  }
  if (!Util.isUnset(request.reasonId)) {
    body['ReasonId'] = request.reasonId;
  }
  if (!Util.isUnset(request.refundCode)) {
    body['RefundCode'] = request.refundCode;
  }
  if (!Util.isUnset(request.refundCount)) {
    body['RefundCount'] = request.refundCount;
  }
  if (!Util.isUnset(request.refundFee)) {
    body['RefundFee'] = request.refundFee;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    body['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyRefundWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ModifyRefundWithDesignatedTbUidRequest
 * @return ModifyRefundWithDesignatedTbUidResponse
 */
async function modifyRefundWithDesignatedTbUid(request: ModifyRefundWithDesignatedTbUidRequest): ModifyRefundWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyRefundWithDesignatedTbUidWithOptions(request, runtime);
}

model ModifySettleAccountRequest {
  accountChannel?: string(name='AccountChannel', example='bank'),
  accountId?: string(name='AccountId', example='1766******9951934'),
  accountName?: string(name='AccountName'),
  accountNo?: string(name='AccountNo', example='123******000'),
  accountPayType?: string(name='AccountPayType', example='transferIn'),
  accountType?: string(name='AccountType', example='company'),
  bizId?: string(name='BizId', example='LMALL20******001'),
  countryOrAreaCode?: string(name='CountryOrAreaCode', example='HK'),
  currency?: string(name='Currency', example='CNY'),
  extInfo?: string(name='ExtInfo'),
  idempotentId?: string(name='IdempotentId', example='202112******31746-1202'),
}

model ModifySettleAccountResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message'),
  model?: {
    accountId?: string(name='AccountId', example='69******45'),
    accountNo?: string(name='AccountNo', example='15******65'),
    id?: string(name='Id', example='F-7805***B4A4A2762'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='5127621C-****-5DCA-9745-2936B31DFD12'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
}

model ModifySettleAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifySettleAccountResponseBody(name='body'),
}

/**
 * @summary 修改结算账号
 *
 * @param request ModifySettleAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifySettleAccountResponse
 */
async function modifySettleAccountWithOptions(request: ModifySettleAccountRequest, runtime: Util.RuntimeOptions): ModifySettleAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountChannel)) {
    body['AccountChannel'] = request.accountChannel;
  }
  if (!Util.isUnset(request.accountId)) {
    body['AccountId'] = request.accountId;
  }
  if (!Util.isUnset(request.accountName)) {
    body['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.accountNo)) {
    body['AccountNo'] = request.accountNo;
  }
  if (!Util.isUnset(request.accountPayType)) {
    body['AccountPayType'] = request.accountPayType;
  }
  if (!Util.isUnset(request.accountType)) {
    body['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.countryOrAreaCode)) {
    body['CountryOrAreaCode'] = request.countryOrAreaCode;
  }
  if (!Util.isUnset(request.currency)) {
    body['Currency'] = request.currency;
  }
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.idempotentId)) {
    body['IdempotentId'] = request.idempotentId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifySettleAccount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改结算账号
 *
 * @param request ModifySettleAccountRequest
 * @return ModifySettleAccountResponse
 */
async function modifySettleAccount(request: ModifySettleAccountRequest): ModifySettleAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifySettleAccountWithOptions(request, runtime);
}

model ModifySupplierPriceAndPriceCentRequest {
  bizId?: string(name='BizId', example='LMALL20220713****'),
  lmItemId?: string(name='LmItemId', example='10026780-55789045****'),
  lmShopId?: string(name='LmShopId', example='1002****'),
  priceCent?: string(name='PriceCent', example='4880'),
  skuId?: string(name='SkuId', example='490073602****'),
  supplierPrice?: string(name='SupplierPrice', example='10'),
}

model ModifySupplierPriceAndPriceCentResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='The bizId or lmOrderId is mandatory for this action.'),
  model?: boolean(name='Model', example='true'),
  requestId?: string(name='RequestId', description='Id of the request', example='F1339E71-CB73-5440-BD39-1C98A8ED50E3'),
}

model ModifySupplierPriceAndPriceCentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifySupplierPriceAndPriceCentResponseBody(name='body'),
}

/**
 * @summary 修改商品供货价和渠道售价
 *
 * @param request ModifySupplierPriceAndPriceCentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifySupplierPriceAndPriceCentResponse
 */
async function modifySupplierPriceAndPriceCentWithOptions(request: ModifySupplierPriceAndPriceCentRequest, runtime: Util.RuntimeOptions): ModifySupplierPriceAndPriceCentResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.lmShopId)) {
    query['LmShopId'] = request.lmShopId;
  }
  if (!Util.isUnset(request.priceCent)) {
    query['PriceCent'] = request.priceCent;
  }
  if (!Util.isUnset(request.skuId)) {
    query['SkuId'] = request.skuId;
  }
  if (!Util.isUnset(request.supplierPrice)) {
    query['SupplierPrice'] = request.supplierPrice;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifySupplierPriceAndPriceCent',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改商品供货价和渠道售价
 *
 * @param request ModifySupplierPriceAndPriceCentRequest
 * @return ModifySupplierPriceAndPriceCentResponse
 */
async function modifySupplierPriceAndPriceCent(request: ModifySupplierPriceAndPriceCentRequest): ModifySupplierPriceAndPriceCentResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifySupplierPriceAndPriceCentWithOptions(request, runtime);
}

model OpenRealTbAccountSupportRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20***002'),
}

model OpenRealTbAccountSupportResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: any(name='Model', example='[]'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='1'),
  requestId?: string(name='RequestId', example='6103AD7B-2***0-579DA58D08E8'),
  subCode?: string(name='SubCode', example='201'),
  subMessage?: string(name='SubMessage', example='""'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model OpenRealTbAccountSupportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OpenRealTbAccountSupportResponseBody(name='body'),
}

/**
 * @param request OpenRealTbAccountSupportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OpenRealTbAccountSupportResponse
 */
async function openRealTbAccountSupportWithOptions(request: OpenRealTbAccountSupportRequest, runtime: Util.RuntimeOptions): OpenRealTbAccountSupportResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'OpenRealTbAccountSupport',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request OpenRealTbAccountSupportRequest
 * @return OpenRealTbAccountSupportResponse
 */
async function openRealTbAccountSupport(request: OpenRealTbAccountSupportRequest): OpenRealTbAccountSupportResponse {
  var runtime = new Util.RuntimeOptions{};
  return openRealTbAccountSupportWithOptions(request, runtime);
}

model PushUserGameProcessRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  currentStepId?: string(name='CurrentStepId', description='This parameter is required.', example='""'),
  extInfo?: map[string]any(name='ExtInfo', example='{\\\\"gmtCreate\\\\":\\\\"2022-01-01 00:00:00\\\\"}'),
  processId?: string(name='ProcessId', description='This parameter is required.', example='6734******4397953'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******343'),
  body?: map[string]any(name='body', example='{\\\\"orderNo\\\\":\\\\"20211204211241160338-120\\\\",\\\\"serialNumber\\\\":\\\\"0\\\\",\\\\"voucherId\\\\":\\\\"202112040007300238170AD22N26\\\\",\\\\"userId\\\\":\\\\"2088312906117381\\\\"}'),
}

model PushUserGameProcessShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  currentStepId?: string(name='CurrentStepId', description='This parameter is required.', example='""'),
  extInfoShrink?: string(name='ExtInfo', example='{\\\\"gmtCreate\\\\":\\\\"2022-01-01 00:00:00\\\\"}'),
  processId?: string(name='ProcessId', description='This parameter is required.', example='6734******4397953'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******343'),
  bodyShrink?: string(name='body', example='{\\\\"orderNo\\\\":\\\\"20211204211241160338-120\\\\",\\\\"serialNumber\\\\":\\\\"0\\\\",\\\\"voucherId\\\\":\\\\"202112040007300238170AD22N26\\\\",\\\\"userId\\\\":\\\\"2088312906117381\\\\"}'),
}

model PushUserGameProcessResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='Success'),
  model?: {
    activityId?: string(name='ActivityId', example='123'),
    currentShowContent?: string(name='CurrentShowContent', example='""'),
    currentStepId?: string(name='CurrentStepId', example='""'),
    currentStepStatus?: string(name='CurrentStepStatus', example='""'),
    desc?: string(name='Desc', example='""'),
    extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
    gameId?: string(name='GameId', example='67176******67874'),
    name?: string(name='Name', example='""'),
    processId?: string(name='ProcessId', example='6734******4397953'),
    routeId?: string(name='RouteId', example='RouteId_1'),
    status?: string(name='Status', example='""'),
    type?: string(name='Type', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
}

model PushUserGameProcessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PushUserGameProcessResponseBody(name='body'),
}

/**
 * @summary 推进用户游戏进度（活动玩法）
 *
 * @param tmpReq PushUserGameProcessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PushUserGameProcessResponse
 */
async function pushUserGameProcessWithOptions(tmpReq: PushUserGameProcessRequest, runtime: Util.RuntimeOptions): PushUserGameProcessResponse {
  Util.validateModel(tmpReq);
  var request = new PushUserGameProcessShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.body)) {
    request.bodyShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.body, 'body', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.currentStepId)) {
    query['CurrentStepId'] = request.currentStepId;
  }
  if (!Util.isUnset(request.processId)) {
    query['ProcessId'] = request.processId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  if (!Util.isUnset(request.bodyShrink)) {
    body['body'] = request.bodyShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PushUserGameProcess',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 推进用户游戏进度（活动玩法）
 *
 * @param request PushUserGameProcessRequest
 * @return PushUserGameProcessResponse
 */
async function pushUserGameProcess(request: PushUserGameProcessRequest): PushUserGameProcessResponse {
  var runtime = new Util.RuntimeOptions{};
  return pushUserGameProcessWithOptions(request, runtime);
}

model QueryActivityItemsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2000***12'),
  lmActivityId?: long(name='LmActivityId', description='This parameter is required.', example='679'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
}

model QueryActivityItemsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmActivityItemModelList?: {
    lmActivityItemModel?: [ 
    {
      canSell?: boolean(name='CanSell', example='true'),
      itemActivityQuantity?: int32(name='ItemActivityQuantity', example='-1'),
      itemActivityStatus?: string(name='ItemActivityStatus'),
      itemId?: long(name='ItemId', example='65332479****'),
      itemTitle?: string(name='ItemTitle'),
      lmActivityId?: long(name='LmActivityId', example='679'),
      lmItemId?: string(name='LmItemId', example='10006138-63786616****'),
      lmShopId?: string(name='LmShopId', example='1002****'),
      mainPicUrl?: string(name='MainPicUrl'),
      sellableQuantity?: int32(name='SellableQuantity', example='200'),
      skuModelList?: {
        lmActivityItemSkuModel?: [ 
        {
          activityPrice?: long(name='ActivityPrice', example='1990'),
          activityStatus?: string(name='ActivityStatus'),
          bizId?: string(name='BizId', example='LMALL20211013****'),
          itemId?: long(name='ItemId', example='64092072****'),
          lmActivityId?: long(name='LmActivityId', example='679'),
          lmItemId?: string(name='LmItemId', example='10000035-63064613****'),
          reservedPrice?: long(name='ReservedPrice', example='2990'),
          skuId?: long(name='SkuId', description='skuID', example='478531731****'),
          skuPicUrl?: string(name='SkuPicUrl'),
          skuTitle?: string(name='SkuTitle'),
          tips?: string(name='Tips'),
        }
      ](name='LmActivityItemSkuModel')
      }(name='SkuModelList'),
      tbSellerId?: long(name='TbSellerId', example='285278****'),
      tbShopId?: long(name='TbShopId', example='13089****'),
      tbShopName?: string(name='TbShopName'),
      tips?: string(name='Tips'),
    }
  ](name='LmActivityItemModel')
  }(name='LmActivityItemModelList'),
  message?: string(name='Message', example='SUCCESS'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='539E5C68-D8B5-57EC-9D9B-58AFD9E0****'),
  totalCount?: long(name='TotalCount', example='12'),
}

model QueryActivityItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryActivityItemsResponseBody(name='body'),
}

/**
 * @param request QueryActivityItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryActivityItemsResponse
 */
async function queryActivityItemsWithOptions(request: QueryActivityItemsRequest, runtime: Util.RuntimeOptions): QueryActivityItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.lmActivityId)) {
    query['LmActivityId'] = request.lmActivityId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryActivityItems',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryActivityItemsRequest
 * @return QueryActivityItemsResponse
 */
async function queryActivityItems(request: QueryActivityItemsRequest): QueryActivityItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryActivityItemsWithOptions(request, runtime);
}

model QueryAddressRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL202106040001'),
  divisionCode?: string(name='DivisionCode', example='510132'),
  ip?: string(name='Ip', example='113.77.105.73'),
}

model QueryAddressResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  divisionAddress?: {
    divisionAddress?: [ 
    {
      divisionCode?: long(name='DivisionCode', example='210211019'),
      divisionLevel?: int32(name='DivisionLevel', example='1'),
      divisionName?: string(name='DivisionName'),
      parentId?: long(name='ParentId', example='30226760'),
    }
  ](name='DivisionAddress')
  }(name='DivisionAddress'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='1A0D9B6B-EBEA-5B7C-B10D-C4455F842637'),
}

model QueryAddressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAddressResponseBody(name='body'),
}

/**
 * @param request QueryAddressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAddressResponse
 */
async function queryAddressWithOptions(request: QueryAddressRequest, runtime: Util.RuntimeOptions): QueryAddressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.divisionCode)) {
    query['DivisionCode'] = request.divisionCode;
  }
  if (!Util.isUnset(request.ip)) {
    query['Ip'] = request.ip;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAddress',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryAddressRequest
 * @return QueryAddressResponse
 */
async function queryAddress(request: QueryAddressRequest): QueryAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAddressWithOptions(request, runtime);
}

model QueryAddressDetailRequest {
  addressInfo?: string(name='AddressInfo'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2******01'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryAddressDetailResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  deliveryAddress?: {
    addressDetail?: string(name='AddressDetail', example='********************'),
    addressId?: long(name='AddressId', example='313312207'),
    area?: string(name='Area', example='fujian'),
    city?: string(name='City'),
    country?: string(name='Country', example='CN'),
    divisionCode?: string(name='DivisionCode', example='321112104'),
    fullName?: string(name='FullName'),
    mobile?: string(name='Mobile', example='18941288583'),
    postCode?: string(name='PostCode', example='518055'),
    province?: string(name='Province'),
    status?: int32(name='Status', example='0'),
    town?: string(name='Town'),
    townDivisionCode?: string(name='TownDivisionCode'),
  }(name='DeliveryAddress'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D08E8'),
}

model QueryAddressDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAddressDetailResponseBody(name='body'),
}

/**
 * @param request QueryAddressDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAddressDetailResponse
 */
async function queryAddressDetailWithOptions(request: QueryAddressDetailRequest, runtime: Util.RuntimeOptions): QueryAddressDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.addressInfo)) {
    query['AddressInfo'] = request.addressInfo;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAddressDetail',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryAddressDetailRequest
 * @return QueryAddressDetailResponse
 */
async function queryAddressDetail(request: QueryAddressDetailRequest): QueryAddressDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAddressDetailWithOptions(request, runtime);
}

model QueryAddressListRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2***100001'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='12312'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryAddressListResponseBody = {
  addressList?: [ 
    {
      addressDetail?: string(name='AddressDetail', example='*********************'),
      addressId?: long(name='AddressId', example='314304607'),
      area?: string(name='Area', example='xianggang'),
      city?: string(name='City'),
      country?: string(name='Country', example='CN'),
      divisionCode?: string(name='DivisionCode', example='230921'),
      fullName?: string(name='FullName'),
      mobile?: string(name='Mobile', example='18611921898'),
      postCode?: string(name='PostCode', example='323050'),
      province?: string(name='Province'),
      status?: int32(name='Status', example='1'),
      town?: string(name='Town'),
      townDivisionCode?: string(name='TownDivisionCode'),
    }
  ](name='AddressList'),
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
}

model QueryAddressListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAddressListResponseBody(name='body'),
}

/**
 * @param request QueryAddressListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAddressListResponse
 */
async function queryAddressListWithOptions(request: QueryAddressListRequest, runtime: Util.RuntimeOptions): QueryAddressListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAddressList',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryAddressListRequest
 * @return QueryAddressListResponse
 */
async function queryAddressList(request: QueryAddressListRequest): QueryAddressListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAddressListWithOptions(request, runtime);
}

model QueryAdvertisementSettleInfoRequest {
  bizId?: string(name='BizId', example='LMALL20******006'),
  channelId?: string(name='ChannelId', example='5781******561'),
  endTime?: string(name='EndTime', example='2021-08-01 01:00:00'),
  extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
  mediaSettleDetailId?: string(name='MediaSettleDetailId', example='""'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  settleNo?: string(name='SettleNo', example='TEST000000'),
  startTime?: string(name='StartTime', example='2021-08-01 00:00:00'),
}

model QueryAdvertisementSettleInfoResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    advertiseSettleInfoList?: [ 
      {
        advertiseName?: string(name='AdvertiseName', example='""'),
        advertiseSettleAmount?: string(name='AdvertiseSettleAmount', example='1000'),
        advertiseSettleDetailId?: string(name='AdvertiseSettleDetailId', example='""'),
        channelId?: string(name='ChannelId', example='5781******561'),
        createDate?: string(name='CreateDate', example='2021-09-11 10:00:00'),
        endTime?: string(name='EndTime', example='2021-09-11 10:01:00'),
        extInfo?: string(name='ExtInfo', example='{}'),
        mediaSettleDetailId?: string(name='MediaSettleDetailId', example='""'),
        modifiedDate?: string(name='ModifiedDate', example='2021-09-11 10:01:00'),
        settleNo?: string(name='SettleNo', example='TEST000000'),
        settleStatus?: string(name='SettleStatus', example='""'),
        startTime?: string(name='StartTime', example='2021-09-11 10:00:00'),
      }
    ](name='AdvertiseSettleInfoList'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='20'),
    totalCount?: int32(name='TotalCount', example='19'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='D94987AE-2290-5084-AA34-53C50A245AFA'),
  subCode?: string(name='SubCode', example='206'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model QueryAdvertisementSettleInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAdvertisementSettleInfoResponseBody(name='body'),
}

/**
 * @param request QueryAdvertisementSettleInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAdvertisementSettleInfoResponse
 */
async function queryAdvertisementSettleInfoWithOptions(request: QueryAdvertisementSettleInfoRequest, runtime: Util.RuntimeOptions): QueryAdvertisementSettleInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.extInfo)) {
    query['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.mediaSettleDetailId)) {
    query['MediaSettleDetailId'] = request.mediaSettleDetailId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.settleNo)) {
    query['SettleNo'] = request.settleNo;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAdvertisementSettleInfo',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryAdvertisementSettleInfoRequest
 * @return QueryAdvertisementSettleInfoResponse
 */
async function queryAdvertisementSettleInfo(request: QueryAdvertisementSettleInfoRequest): QueryAdvertisementSettleInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAdvertisementSettleInfoWithOptions(request, runtime);
}

model QueryAgreementRequest {
  agreementNo?: string(name='AgreementNo', example='20******8006'),
  externalAgreementNo?: string(name='ExternalAgreementNo', example='""'),
  merchantId?: string(name='MerchantId', example='""'),
}

model QueryAgreementResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  queryAgreementResponse?: {
    agreementNo?: string(name='AgreementNo', example='20******8006'),
    externalAgreementNo?: string(name='ExternalAgreementNo', example='""'),
    invalidTime?: string(name='InvalidTime', example='2022-08-01 00:00:00'),
    signTime?: string(name='SignTime', example='2021-08-01 00:00:00'),
    status?: string(name='Status', example='""'),
    validTime?: string(name='ValidTime', example='2021-08-01 00:00:00'),
  }(name='QueryAgreementResponse'),
  requestId?: string(name='RequestId', example='DAAA6391-3339-5333-9E4D-C71CD26A231F'),
}

model QueryAgreementResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAgreementResponseBody(name='body'),
}

/**
 * @param request QueryAgreementRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAgreementResponse
 */
async function queryAgreementWithOptions(request: QueryAgreementRequest, runtime: Util.RuntimeOptions): QueryAgreementResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.agreementNo)) {
    body['AgreementNo'] = request.agreementNo;
  }
  if (!Util.isUnset(request.externalAgreementNo)) {
    body['ExternalAgreementNo'] = request.externalAgreementNo;
  }
  if (!Util.isUnset(request.merchantId)) {
    body['MerchantId'] = request.merchantId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryAgreement',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryAgreementRequest
 * @return QueryAgreementResponse
 */
async function queryAgreement(request: QueryAgreementRequest): QueryAgreementResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAgreementWithOptions(request, runtime);
}

model QueryAllCinemasRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  cityCode?: long(name='CityCode', description='This parameter is required.', example='330100'),
  extJson?: string(name='ExtJson', example='{}'),
  pageNumber?: long(name='PageNumber', description='This parameter is required.', example='1'),
}

model QueryAllCinemasResponseBody = {
  cinemas?: {
    cinema?: [ 
    {
      address?: string(name='Address', example='""'),
      cinemaName?: string(name='CinemaName', example='""'),
      cityId?: long(name='CityId', example='330100'),
      cityName?: string(name='CityName'),
      id?: long(name='Id', example='153'),
      latitude?: string(name='Latitude', example='""'),
      longitude?: string(name='Longitude', example='""'),
      phone?: string(name='Phone', example='""'),
      scheduleCloseTime?: long(name='ScheduleCloseTime', example='15'),
      standardId?: string(name='StandardId', example='42112601'),
    }
  ](name='Cinema')
  }(name='Cinemas'),
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D08E8'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model QueryAllCinemasResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAllCinemasResponseBody(name='body'),
}

/**
 * @param request QueryAllCinemasRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAllCinemasResponse
 */
async function queryAllCinemasWithOptions(request: QueryAllCinemasRequest, runtime: Util.RuntimeOptions): QueryAllCinemasResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.cityCode)) {
    query['CityCode'] = request.cityCode;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAllCinemas',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryAllCinemasRequest
 * @return QueryAllCinemasResponse
 */
async function queryAllCinemas(request: QueryAllCinemasRequest): QueryAllCinemasResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAllCinemasWithOptions(request, runtime);
}

model QueryAllCitiesRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  extJson?: map[string]any(name='ExtJson', example='{}'),
}

model QueryAllCitiesShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  extJsonShrink?: string(name='ExtJson', example='{}'),
}

model QueryAllCitiesResponseBody = {
  cities?: {
    city?: [ 
    {
      cityCode?: long(name='CityCode', example='110100'),
      id?: long(name='Id', example='424'),
      name?: string(name='Name'),
      parentId?: long(name='ParentId', example='110000'),
      pinYin?: string(name='PinYin', example='beijing'),
    }
  ](name='City')
  }(name='Cities'),
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
  subCode?: string(name='SubCode', example='1004'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
}

model QueryAllCitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAllCitiesResponseBody(name='body'),
}

/**
 * @param tmpReq QueryAllCitiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAllCitiesResponse
 */
async function queryAllCitiesWithOptions(tmpReq: QueryAllCitiesRequest, runtime: Util.RuntimeOptions): QueryAllCitiesResponse {
  Util.validateModel(tmpReq);
  var request = new QueryAllCitiesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extJson)) {
    request.extJsonShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extJson, 'ExtJson', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.extJsonShrink)) {
    query['ExtJson'] = request.extJsonShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAllCities',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryAllCitiesRequest
 * @return QueryAllCitiesResponse
 */
async function queryAllCities(request: QueryAllCitiesRequest): QueryAllCitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAllCitiesWithOptions(request, runtime);
}

model QueryBatchRegistAnonymousTbAccountResultRequest {
  batchId?: string(name='BatchId', description='This parameter is required.', example='10418*******'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210125****'),
}

model QueryBatchRegistAnonymousTbAccountResultResponseBody = {
  batchId?: string(name='BatchId', example='10418*******'),
  code?: string(name='Code', example='SUCCESS'),
  failIds?: {
    failId?: [ string ](name='FailId')
  }(name='FailIds'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='5E2D59BA-4EB0-45C4-A0D7-D98C1A4B****'),
  status?: string(name='Status', example='SUCCESS'),
}

model QueryBatchRegistAnonymousTbAccountResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryBatchRegistAnonymousTbAccountResultResponseBody(name='body'),
}

/**
 * @param request QueryBatchRegistAnonymousTbAccountResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryBatchRegistAnonymousTbAccountResultResponse
 */
async function queryBatchRegistAnonymousTbAccountResultWithOptions(request: QueryBatchRegistAnonymousTbAccountResultRequest, runtime: Util.RuntimeOptions): QueryBatchRegistAnonymousTbAccountResultResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.batchId)) {
    query['BatchId'] = request.batchId;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryBatchRegistAnonymousTbAccountResult',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryBatchRegistAnonymousTbAccountResultRequest
 * @return QueryBatchRegistAnonymousTbAccountResultResponse
 */
async function queryBatchRegistAnonymousTbAccountResult(request: QueryBatchRegistAnonymousTbAccountResultRequest): QueryBatchRegistAnonymousTbAccountResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryBatchRegistAnonymousTbAccountResultWithOptions(request, runtime);
}

model QueryBestSession4ItemsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211118****'),
  itemIds?: map[string]any(name='ItemIds', example='[63928655****,65314637****,65771454****]'),
  lmItemIds?: map[string]any(name='LmItemIds', example='[\\\\"10000791-65975997****\\\\"]'),
}

model QueryBestSession4ItemsShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211118****'),
  itemIdsShrink?: string(name='ItemIds', example='[63928655****,65314637****,65771454****]'),
  lmItemIdsShrink?: string(name='LmItemIds', example='[\\\\"10000791-65975997****\\\\"]'),
}

model QueryBestSession4ItemsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmItemActivitySessionModelList?: {
    lmItemActivitySessionModel?: [ 
    {
      itemId?: long(name='ItemId', example='66440412****'),
      lmActivitySessionModel?: {
        bizId?: string(name='BizId', example='LMALL20190325****'),
        description?: string(name='Description', example='""'),
        displayDate?: string(name='DisplayDate', example='2022-03-09 18:59:59'),
        endDate?: string(name='EndDate', example='2022-03-09 18:59:59'),
        extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
        lmActivityId?: long(name='LmActivityId', example='679'),
        lmSessionId?: long(name='LmSessionId', example='679'),
        name?: string(name='Name'),
        startDate?: string(name='StartDate', example='2021-12-25 09:07:00'),
        subBizCode?: string(name='SubBizCode', example='cf5eddd467ca4d4a8105378a3ea****'),
      }(name='LmActivitySessionModel'),
      lmItemId?: string(name='LmItemId', example='10000102-65875550****'),
    }
  ](name='LmItemActivitySessionModel')
  }(name='LmItemActivitySessionModelList'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='DA2554FD-F21F-536F-A7B7-B96C3E5F****'),
}

model QueryBestSession4ItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryBestSession4ItemsResponseBody(name='body'),
}

/**
 * @param tmpReq QueryBestSession4ItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryBestSession4ItemsResponse
 */
async function queryBestSession4ItemsWithOptions(tmpReq: QueryBestSession4ItemsRequest, runtime: Util.RuntimeOptions): QueryBestSession4ItemsResponse {
  Util.validateModel(tmpReq);
  var request = new QueryBestSession4ItemsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.itemIds)) {
    request.itemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.itemIds, 'ItemIds', 'json');
  }
  if (!Util.isUnset(tmpReq.lmItemIds)) {
    request.lmItemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lmItemIds, 'LmItemIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.itemIdsShrink)) {
    query['ItemIds'] = request.itemIdsShrink;
  }
  if (!Util.isUnset(request.lmItemIdsShrink)) {
    query['LmItemIds'] = request.lmItemIdsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryBestSession4Items',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryBestSession4ItemsRequest
 * @return QueryBestSession4ItemsResponse
 */
async function queryBestSession4Items(request: QueryBestSession4ItemsRequest): QueryBestSession4ItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryBestSession4ItemsWithOptions(request, runtime);
}

model QueryBizItemListRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211202****'),
  categoryId?: long(name='CategoryId', example='50003449'),
  itemIds?: map[string]any(name='ItemIds', example='[63524643****]'),
  lmItemIds?: map[string]any(name='LmItemIds', example='[\\\\"10000791-65975997****\\\\"]'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  subBizId?: string(name='SubBizId', example='sQuuSHY*************'),
  userId?: string(name='UserId', example='2114255235****'),
}

model QueryBizItemListShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211202****'),
  categoryId?: long(name='CategoryId', example='50003449'),
  itemIdsShrink?: string(name='ItemIds', example='[63524643****]'),
  lmItemIdsShrink?: string(name='LmItemIds', example='[\\\\"10000791-65975997****\\\\"]'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  subBizId?: string(name='SubBizId', example='sQuuSHY*************'),
  userId?: string(name='UserId', example='2114255235****'),
}

model QueryBizItemListResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemList?: {
    item?: [ 
    {
      canSell?: boolean(name='CanSell', example='true'),
      categoryId?: long(name='CategoryId', example='50050579'),
      customizedItemName?: string(name='CustomizedItemName'),
      extJson?: string(name='ExtJson', example='""'),
      itemId?: long(name='ItemId', example='64944233****'),
      itemTitle?: string(name='ItemTitle'),
      lmItemId?: string(name='LmItemId', example='10000102-65931326****'),
      mainPicUrl?: string(name='MainPicUrl'),
      reservePrice?: long(name='ReservePrice', example='2990'),
      sellerId?: long(name='SellerId', example='284324****'),
      skuList?: {
        sku?: [ 
        {
          benefitId?: string(name='BenefitId', example='202109240050220000008822****'),
          canSell?: boolean(name='CanSell', example='true'),
          customizedAttributeMap?: map[string]any(name='CustomizedAttributeMap', example='{}'),
          gradePriceModels?: {
            gradePriceModel?: [ 
            {
              accessUrl?: string(name='AccessUrl'),
              canBuy?: boolean(name='CanBuy'),
              characteristicCode?: string(name='CharacteristicCode'),
              characteristicName?: string(name='CharacteristicName'),
              exclusive?: boolean(name='Exclusive'),
              icon?: string(name='Icon'),
              pointPrice?: long(name='PointPrice'),
              points?: long(name='Points', example='2990'),
              pointsAmount?: long(name='PointsAmount', example='2990'),
              priceCent?: long(name='PriceCent'),
              recommend?: boolean(name='Recommend'),
              showName?: string(name='ShowName'),
              subBizCode?: string(name='SubBizCode'),
              userLabelList?: {
                userLabelList?: [ string ](name='UserLabelList')
              }(name='UserLabelList'),
            }
          ](name='GradePriceModel')
          }(name='GradePriceModels'),
          points?: long(name='Points', example='2990'),
          pointsAmount?: long(name='PointsAmount', example='2990'),
          priceCent?: long(name='PriceCent', example='1990'),
          skuId?: long(name='SkuId', example='482694857****'),
          skuPicUrl?: string(name='SkuPicUrl'),
          skuTitle?: string(name='SkuTitle'),
          taoBaoCurrentPrice?: long(name='TaoBaoCurrentPrice', example='4990'),
          userLabelList?: {
            userLabelList?: [ string ](name='UserLabelList')
          }(name='UserLabelList'),
        }
      ](name='Sku')
      }(name='SkuList'),
      taobaoShopName?: string(name='TaobaoShopName'),
    }
  ](name='Item')
  }(name='ItemList'),
  message?: string(name='Message', example='The specified parameter %s value is not valid.'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='5B9B6D8D-A78D-521D-B6B6-08CDC182****'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model QueryBizItemListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryBizItemListResponseBody(name='body'),
}

/**
 * @param tmpReq QueryBizItemListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryBizItemListResponse
 */
async function queryBizItemListWithOptions(tmpReq: QueryBizItemListRequest, runtime: Util.RuntimeOptions): QueryBizItemListResponse {
  Util.validateModel(tmpReq);
  var request = new QueryBizItemListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.itemIds)) {
    request.itemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.itemIds, 'ItemIds', 'json');
  }
  if (!Util.isUnset(tmpReq.lmItemIds)) {
    request.lmItemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lmItemIds, 'LmItemIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.categoryId)) {
    query['CategoryId'] = request.categoryId;
  }
  if (!Util.isUnset(request.itemIdsShrink)) {
    query['ItemIds'] = request.itemIdsShrink;
  }
  if (!Util.isUnset(request.lmItemIdsShrink)) {
    query['LmItemIds'] = request.lmItemIdsShrink;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.subBizId)) {
    query['SubBizId'] = request.subBizId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryBizItemList',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryBizItemListRequest
 * @return QueryBizItemListResponse
 */
async function queryBizItemList(request: QueryBizItemListRequest): QueryBizItemListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryBizItemListWithOptions(request, runtime);
}

model QueryBizItemListV2Request {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210802****'),
  categoryId?: long(name='CategoryId', example='5001****'),
  itemIds?: [ long ](name='ItemIds'),
  lmItemIds?: [ string ](name='LmItemIds'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  subBizId?: string(name='SubBizId', example='db18296d3e56417c8817acf43bfd****'),
  userId?: string(name='UserId', example='214123553****'),
}

model QueryBizItemListV2ShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210802****'),
  categoryId?: long(name='CategoryId', example='5001****'),
  itemIdsShrink?: string(name='ItemIds'),
  lmItemIdsShrink?: string(name='LmItemIds'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  subBizId?: string(name='SubBizId', example='db18296d3e56417c8817acf43bfd****'),
  userId?: string(name='UserId', example='214123553****'),
}

model QueryBizItemListV2ResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemList?: {
    item?: [ 
    {
      canSell?: boolean(name='CanSell', example='true'),
      categoryId?: long(name='CategoryId', example='50014741'),
      customizedItemName?: string(name='CustomizedItemName'),
      extJson?: string(name='ExtJson', example='""'),
      itemId?: long(name='ItemId', example='60843842****'),
      itemTitle?: string(name='ItemTitle'),
      lmItemId?: string(name='LmItemId', example='10001031-61382859****'),
      mainPicUrl?: string(name='MainPicUrl'),
      reservePrice?: long(name='ReservePrice', example='4990'),
      sellerId?: long(name='SellerId', example='220868858****'),
      skuList?: {
        sku?: [ 
        {
          benefitId?: string(name='BenefitId', example='202110260050220000009154****'),
          canSell?: boolean(name='CanSell', example='true'),
          customizedAttributeMap?: map[string]any(name='CustomizedAttributeMap', example='{}'),
          gradePriceModels?: {
            gradePriceModel?: [ 
            {
              accessUrl?: string(name='AccessUrl'),
              canBuy?: boolean(name='CanBuy'),
              characteristicCode?: string(name='CharacteristicCode'),
              characteristicName?: string(name='CharacteristicName'),
              exclusive?: boolean(name='Exclusive'),
              icon?: string(name='Icon'),
              pointPrice?: long(name='PointPrice'),
              points?: long(name='Points', example='2990'),
              pointsAmount?: long(name='PointsAmount', example='0'),
              priceCent?: long(name='PriceCent', example='2990'),
              recommend?: boolean(name='Recommend'),
              showName?: string(name='ShowName'),
              subBizCode?: string(name='SubBizCode', example='c7cd01774ad24fe08fbda01e9****'),
              userLabelList?: {
                userLabelList?: [ string ](name='UserLabelList')
              }(name='UserLabelList'),
            }
          ](name='GradePriceModel')
          }(name='GradePriceModels'),
          points?: long(name='Points', example='0'),
          pointsAmount?: long(name='PointsAmount', example='2190'),
          priceCent?: long(name='PriceCent', example='4990'),
          skuId?: long(name='SkuId', example='464704439****'),
          skuPicUrl?: string(name='SkuPicUrl'),
          skuTitle?: string(name='SkuTitle'),
          taoBaoCurrentPrice?: long(name='TaoBaoCurrentPrice', example='4990'),
          userLabelList?: {
            userLabelList?: [ string ](name='UserLabelList')
          }(name='UserLabelList'),
        }
      ](name='Sku')
      }(name='SkuList'),
      taobaoShopName?: string(name='TaobaoShopName'),
    }
  ](name='Item')
  }(name='ItemList'),
  message?: string(name='Message', example='SUCCESS'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='5A5D5396-AFA0-56A3-86E5-13AB4C80****'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model QueryBizItemListV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryBizItemListV2ResponseBody(name='body'),
}

/**
 * @param tmpReq QueryBizItemListV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryBizItemListV2Response
 */
async function queryBizItemListV2WithOptions(tmpReq: QueryBizItemListV2Request, runtime: Util.RuntimeOptions): QueryBizItemListV2Response {
  Util.validateModel(tmpReq);
  var request = new QueryBizItemListV2ShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.itemIds)) {
    request.itemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.itemIds, 'ItemIds', 'json');
  }
  if (!Util.isUnset(tmpReq.lmItemIds)) {
    request.lmItemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lmItemIds, 'LmItemIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.categoryId)) {
    query['CategoryId'] = request.categoryId;
  }
  if (!Util.isUnset(request.itemIdsShrink)) {
    query['ItemIds'] = request.itemIdsShrink;
  }
  if (!Util.isUnset(request.lmItemIdsShrink)) {
    query['LmItemIds'] = request.lmItemIdsShrink;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.subBizId)) {
    query['SubBizId'] = request.subBizId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryBizItemListV2',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryBizItemListV2Request
 * @return QueryBizItemListV2Response
 */
async function queryBizItemListV2(request: QueryBizItemListV2Request): QueryBizItemListV2Response {
  var runtime = new Util.RuntimeOptions{};
  return queryBizItemListV2WithOptions(request, runtime);
}

model QueryBizItemListWithCacheRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211119****'),
  itemIds?: [ long ](name='ItemIds', description='This parameter is required.'),
  lmItemIds?: [ string ](name='LmItemIds'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  subBizCode?: string(name='SubBizCode', description='This parameter is required.', example='7ddaba53d5be4173808f2335eac0****'),
}

model QueryBizItemListWithCacheShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211119****'),
  itemIdsShrink?: string(name='ItemIds', description='This parameter is required.'),
  lmItemIdsShrink?: string(name='LmItemIds'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  subBizCode?: string(name='SubBizCode', description='This parameter is required.', example='7ddaba53d5be4173808f2335eac0****'),
}

model QueryBizItemListWithCacheResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemList?: [ 
    {
      canSell?: boolean(name='CanSell', example='true'),
      itemId?: long(name='ItemId', example='65671280****'),
      itemTitle?: string(name='ItemTitle'),
      lmItemId?: string(name='LmItemId', example='10000102-64373376****'),
      mainPicUrl?: string(name='MainPicUrl'),
      pointPrice?: long(name='PointPrice', example='4990'),
      points?: long(name='Points', example='4990'),
      pointsAmount?: long(name='PointsAmount', example='4990'),
      priceCent?: long(name='PriceCent', example='4990'),
      reservePrice?: long(name='ReservePrice', example='9990'),
      status?: long(name='Status', example='1'),
    }
  ](name='ItemList'),
  message?: string(name='Message', example='The specified parameter %s value is not valid.'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='F2D3CA1E-28BE-5E1C-B55F-81C8F290****'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='13'),
}

model QueryBizItemListWithCacheResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryBizItemListWithCacheResponseBody(name='body'),
}

/**
 * @summary 批量查询商品库商品信息，支持C端导购场景，有30分钟缓存
 *
 * @param tmpReq QueryBizItemListWithCacheRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryBizItemListWithCacheResponse
 */
async function queryBizItemListWithCacheWithOptions(tmpReq: QueryBizItemListWithCacheRequest, runtime: Util.RuntimeOptions): QueryBizItemListWithCacheResponse {
  Util.validateModel(tmpReq);
  var request = new QueryBizItemListWithCacheShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.itemIds)) {
    request.itemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.itemIds, 'ItemIds', 'json');
  }
  if (!Util.isUnset(tmpReq.lmItemIds)) {
    request.lmItemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lmItemIds, 'LmItemIds', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryBizItemListWithCache',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量查询商品库商品信息，支持C端导购场景，有30分钟缓存
 *
 * @param request QueryBizItemListWithCacheRequest
 * @return QueryBizItemListWithCacheResponse
 */
async function queryBizItemListWithCache(request: QueryBizItemListWithCacheRequest): QueryBizItemListWithCacheResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryBizItemListWithCacheWithOptions(request, runtime);
}

model QueryBizItemsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  subBizId?: string(name='SubBizId'),
  userId?: string(name='UserId'),
}

model QueryBizItemsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: string(name='Model'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='96B4141C-A3CD-5162-B435-4780A75E3D97'),
  totalCount?: int32(name='TotalCount', example='19'),
}

model QueryBizItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryBizItemsResponseBody(name='body'),
}

/**
 * @param request QueryBizItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryBizItemsResponse
 */
async function queryBizItemsWithOptions(request: QueryBizItemsRequest, runtime: Util.RuntimeOptions): QueryBizItemsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.subBizId)) {
    query['SubBizId'] = request.subBizId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryBizItems',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryBizItemsRequest
 * @return QueryBizItemsResponse
 */
async function queryBizItems(request: QueryBizItemsRequest): QueryBizItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryBizItemsWithOptions(request, runtime);
}

model QueryBizItemsWithActivityRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL201903220001'),
  itemIds?: map[string]any(name='ItemIds', example='[\\\\"60716881****\\\\",\\\\"59183191****\\\\"]'),
  lmItemIds?: map[string]any(name='LmItemIds', example='[\\\\"10000230-60716881****\\\\",\\\\"10000021-59183191****\\\\"]'),
}

model QueryBizItemsWithActivityShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL201903220001'),
  itemIdsShrink?: string(name='ItemIds', example='[\\\\"60716881****\\\\",\\\\"59183191****\\\\"]'),
  lmItemIdsShrink?: string(name='LmItemIds', example='[\\\\"10000230-60716881****\\\\",\\\\"10000021-59183191****\\\\"]'),
}

model QueryBizItemsWithActivityResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemList?: {
    item?: [ 
    {
      activities?: {
        activity?: [ 
        {
          activityItem?: {
            activityItemSkuList?: {
              activityItemSku?: [ 
              {
                activityPrice?: long(name='ActivityPrice', example='990'),
                skuId?: long(name='SkuId', description='skuId', example='471******57'),
              }
            ](name='ActivityItemSku')
            }(name='ActivityItemSkuList'),
            activityQuantity?: long(name='ActivityQuantity', example='-1'),
            limitQuantityForPerson?: long(name='LimitQuantityForPerson', example='1'),
          }(name='ActivityItem'),
          activitySessions?: {
            activitySession?: [ 
            {
              activitySessionItem?: {
                activitySessionItemSkuList?: {
                  points?: long(name='Points', example='159'),
                  pointsAmount?: long(name='PointsAmount', example='0'),
                  priceCent?: long(name='PriceCent', example='2990'),
                  skuId?: long(name='SkuId', description='skuId', example='471******57'),
                }(name='ActivitySessionItemSkuList'),
                limitQuantityForPerson?: long(name='LimitQuantityForPerson', example='2'),
                saleableQuantity?: long(name='SaleableQuantity', example='888'),
                sessionQuantity?: long(name='SessionQuantity', example='888'),
              }(name='ActivitySessionItem'),
              description?: string(name='Description', example='""'),
              displayDate?: long(name='DisplayDate', example='1633412800000'),
              endDate?: long(name='EndDate', example='1639412800000'),
              lmSessionId?: long(name='LmSessionId', example='329'),
              startDate?: long(name='StartDate', example='1634412800000'),
              subBizCode?: string(name='SubBizCode', example='5fbbd94******4345f6c37166fb'),
              title?: string(name='Title'),
            }
          ](name='ActivitySession')
          }(name='ActivitySessions'),
          description?: string(name='Description'),
          endDate?: long(name='EndDate', example='1642412800000'),
          lmActivityId?: long(name='LmActivityId', example='679'),
          startDate?: long(name='StartDate', example='1632412800000'),
          title?: string(name='Title'),
        }
      ](name='Activity')
      }(name='Activities'),
      categoryId?: long(name='CategoryId', example='50018977'),
      itemId?: long(name='ItemId', example='60716881****'),
      itemTitle?: string(name='ItemTitle'),
      lmItemId?: string(name='LmItemId', example='10000230-60716881****'),
      maxAllowedCount?: int32(name='MaxAllowedCount', example='-1'),
      picUrl?: string(name='PicUrl', example='https://img.alicdn.com/******.jpg'),
      quantity?: long(name='Quantity', example='1000'),
      reservePrice?: long(name='ReservePrice', example='2990'),
      sellerId?: long(name='SellerId', example='284324****'),
      skuList?: {
        sku?: [ 
        {
          maxAllowedCount?: int32(name='MaxAllowedCount', example='1000'),
          points?: long(name='Points', example='69'),
          pointsAmount?: long(name='PointsAmount', example='0'),
          pointsInfo?: string(name='PointsInfo'),
          pointsKey?: string(name='PointsKey'),
          priceCent?: long(name='PriceCent', example='2790'),
          quantity?: long(name='Quantity', example='500'),
          skuId?: long(name='SkuId', description='skuId', example='472266643****'),
          status?: long(name='Status', example='1'),
        }
      ](name='Sku')
      }(name='SkuList'),
      taobaoShopName?: string(name='TaobaoShopName'),
      totalSoldQuantity?: int32(name='TotalSoldQuantity', example='900'),
    }
  ](name='Item')
  }(name='ItemList'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='1A0D9B6B-EBEA-5B7C-B10D-C4455F842637'),
}

model QueryBizItemsWithActivityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryBizItemsWithActivityResponseBody(name='body'),
}

/**
 * @param tmpReq QueryBizItemsWithActivityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryBizItemsWithActivityResponse
 */
async function queryBizItemsWithActivityWithOptions(tmpReq: QueryBizItemsWithActivityRequest, runtime: Util.RuntimeOptions): QueryBizItemsWithActivityResponse {
  Util.validateModel(tmpReq);
  var request = new QueryBizItemsWithActivityShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.itemIds)) {
    request.itemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.itemIds, 'ItemIds', 'json');
  }
  if (!Util.isUnset(tmpReq.lmItemIds)) {
    request.lmItemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lmItemIds, 'LmItemIds', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryBizItemsWithActivity',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryBizItemsWithActivityRequest
 * @return QueryBizItemsWithActivityResponse
 */
async function queryBizItemsWithActivity(request: QueryBizItemsWithActivityRequest): QueryBizItemsWithActivityResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryBizItemsWithActivityWithOptions(request, runtime);
}

model QueryBudgetTicketItemListByBizIdRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******003'),
  budgetTicketNo?: string(name='BudgetTicketNo', example='20******-4'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
}

model QueryBudgetTicketItemListByBizIdResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      invalid?: boolean(name='Invalid', example='true'),
      itemId?: long(name='ItemId', example='65******0310'),
      poCode?: string(name='PoCode', example='""'),
      promotionId?: string(name='PromotionId', example='68442******012'),
      remnantAmount?: long(name='RemnantAmount', example='10000'),
      securityCode?: string(name='SecurityCode', example='c26be******86e5a61cc710cdb'),
      settlementPrice?: long(name='SettlementPrice', example='100'),
      skuId?: long(name='SkuId', example='47******76529'),
      subsidyAmount?: long(name='SubsidyAmount', example='10'),
    }
  ](name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='26F4B2C7-931F-5AC5-8FCC-AE76C9B00D2F'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='16'),
}

model QueryBudgetTicketItemListByBizIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryBudgetTicketItemListByBizIdResponseBody(name='body'),
}

/**
 * @summary 查询采购商品信息
 *
 * @param request QueryBudgetTicketItemListByBizIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryBudgetTicketItemListByBizIdResponse
 */
async function queryBudgetTicketItemListByBizIdWithOptions(request: QueryBudgetTicketItemListByBizIdRequest, runtime: Util.RuntimeOptions): QueryBudgetTicketItemListByBizIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.budgetTicketNo)) {
    query['BudgetTicketNo'] = request.budgetTicketNo;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryBudgetTicketItemListByBizId',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询采购商品信息
 *
 * @param request QueryBudgetTicketItemListByBizIdRequest
 * @return QueryBudgetTicketItemListByBizIdResponse
 */
async function queryBudgetTicketItemListByBizId(request: QueryBudgetTicketItemListByBizIdRequest): QueryBudgetTicketItemListByBizIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryBudgetTicketItemListByBizIdWithOptions(request, runtime);
}

model QueryChannelItemBillDownloadUrlRequest {
  billId?: string(name='BillId', example='BILL-10000007371****'),
  billPeriod?: string(name='BillPeriod', example='2022-11'),
  billStatus?: string(name='BillStatus', example='billGenerated'),
  bizId?: string(name='BizId', example='LMALL20******001'),
  bizName?: string(name='BizName'),
  lmShopId?: long(name='LmShopId', example='1002****'),
  lmShopName?: string(name='LmShopName'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  tenantId?: string(name='TenantId', example='12***29'),
}

model QueryChannelItemBillDownloadUrlResponseBody = {
  code?: string(name='Code', example='200'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='The TenantId or BillPeriod is mandatory for this action.'),
  model?: {
    data?: [ 
      {
        billId?: string(name='BillId', example='BILL-10000014****3410148'),
        fileDownloadUrl?: string(name='FileDownloadUrl', example='http://linkedmall-product.oss-cn-hangzhou.aliyuncs.com/LMALL2*****60001/2619709162****'),
        message?: string(name='Message'),
      }
    ](name='Data'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='20'),
    total?: int32(name='Total', example='685'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='5127621C-****-5DCA-9745-2936B31DFD12'),
}

model QueryChannelItemBillDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryChannelItemBillDownloadUrlResponseBody(name='body'),
}

/**
 * @param request QueryChannelItemBillDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryChannelItemBillDownloadUrlResponse
 */
async function queryChannelItemBillDownloadUrlWithOptions(request: QueryChannelItemBillDownloadUrlRequest, runtime: Util.RuntimeOptions): QueryChannelItemBillDownloadUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.billId)) {
    body['BillId'] = request.billId;
  }
  if (!Util.isUnset(request.billPeriod)) {
    body['BillPeriod'] = request.billPeriod;
  }
  if (!Util.isUnset(request.billStatus)) {
    body['BillStatus'] = request.billStatus;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizName)) {
    body['BizName'] = request.bizName;
  }
  if (!Util.isUnset(request.lmShopId)) {
    body['LmShopId'] = request.lmShopId;
  }
  if (!Util.isUnset(request.lmShopName)) {
    body['LmShopName'] = request.lmShopName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryChannelItemBillDownloadUrl',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryChannelItemBillDownloadUrlRequest
 * @return QueryChannelItemBillDownloadUrlResponse
 */
async function queryChannelItemBillDownloadUrl(request: QueryChannelItemBillDownloadUrlRequest): QueryChannelItemBillDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryChannelItemBillDownloadUrlWithOptions(request, runtime);
}

model QueryGuideItemGroupRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  groupId?: string(name='GroupId', description='This parameter is required.', example='test01'),
  itemState?: string(name='ItemState', example='AVAILABLE_FOR_SALE'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
}

model QueryGuideItemGroupResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  guideItemGroup?: {
    itemInfo?: [ 
    {
      itemId?: long(name='ItemId', example='66******1055'),
      itemTitle?: string(name='ItemTitle'),
      itemUrl?: string(name='ItemUrl'),
      lmItemId?: string(name='LmItemId', example='10001036-******0492928'),
      mainPicUrl?: string(name='MainPicUrl'),
      pointPrice?: long(name='PointPrice', example='990'),
      points?: long(name='Points', example='69'),
      pointsAmount?: long(name='PointsAmount', example='0'),
      priceCent?: long(name='PriceCent', example='990'),
      reservePrice?: string(name='ReservePrice', example='20.0'),
    }
  ](name='ItemInfo')
  }(name='GuideItemGroup'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='1B82570B-7167-5D41-A74F-CD8DC2C54A49'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
}

model QueryGuideItemGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryGuideItemGroupResponseBody(name='body'),
}

/**
 * @summary 查询导购商品组
 *
 * @param request QueryGuideItemGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryGuideItemGroupResponse
 */
async function queryGuideItemGroupWithOptions(request: QueryGuideItemGroupRequest, runtime: Util.RuntimeOptions): QueryGuideItemGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.itemState)) {
    query['ItemState'] = request.itemState;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryGuideItemGroup',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询导购商品组
 *
 * @param request QueryGuideItemGroupRequest
 * @return QueryGuideItemGroupResponse
 */
async function queryGuideItemGroup(request: QueryGuideItemGroupRequest): QueryGuideItemGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryGuideItemGroupWithOptions(request, runtime);
}

model QueryGuideItemGroupForCrowdOperationRequest {
  bizId?: string(name='BizId', example='LMALL20211119****'),
  groupId?: string(name='GroupId', example='taojinbi-shang******'),
  itemState?: string(name='ItemState', example='ALL'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  userFlag?: string(name='UserFlag', example='level1'),
}

model QueryGuideItemGroupForCrowdOperationResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      atmospherePicUrl?: string(name='AtmospherePicUrl'),
      canSell?: boolean(name='CanSell', example='true'),
      customizedAttributeMap?: map[string]string(name='CustomizedAttributeMap'),
      itemId?: string(name='ItemId', example='65******0310'),
      itemTitle?: string(name='ItemTitle'),
      itemUrl?: string(name='ItemUrl', example='https://******.aliyun-inc.com/#/assistant?targetTab=TAB_GM_FAIL&regionId=9&startTime=2022-08-22%2000:00:00&endTime=2022-08-22%2018:06:01&appIds=408'),
      lmItemId?: string(name='LmItemId', example='10000102-630292778855'),
      mainPicUrl?: string(name='MainPicUrl'),
      pointPrice?: long(name='PointPrice'),
      points?: long(name='Points', example='3980'),
      pointsAmount?: long(name='PointsAmount', example='8000'),
      priceCent?: long(name='PriceCent', example='780'),
      reservePrice?: string(name='ReservePrice', example='1035'),
      tags?: [ int32 ](name='Tags'),
      whitePicUrl?: string(name='WhitePicUrl'),
    }
  ](name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='45B9EF4E-4D18-59B2-85E6-9B568F73C79D'),
  subCode?: string(name='SubCode', example='206'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='80'),
}

model QueryGuideItemGroupForCrowdOperationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryGuideItemGroupForCrowdOperationResponseBody(name='body'),
}

/**
 * @param request QueryGuideItemGroupForCrowdOperationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryGuideItemGroupForCrowdOperationResponse
 */
async function queryGuideItemGroupForCrowdOperationWithOptions(request: QueryGuideItemGroupForCrowdOperationRequest, runtime: Util.RuntimeOptions): QueryGuideItemGroupForCrowdOperationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.itemState)) {
    query['ItemState'] = request.itemState;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.userFlag)) {
    query['UserFlag'] = request.userFlag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryGuideItemGroupForCrowdOperation',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryGuideItemGroupForCrowdOperationRequest
 * @return QueryGuideItemGroupForCrowdOperationResponse
 */
async function queryGuideItemGroupForCrowdOperation(request: QueryGuideItemGroupForCrowdOperationRequest): QueryGuideItemGroupForCrowdOperationResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryGuideItemGroupForCrowdOperationWithOptions(request, runtime);
}

model QueryGuideItemGroupWithOutInventoryRequest {
  bizId?: string(name='BizId', example='LMALL20211206****'),
  groupId?: string(name='GroupId', example='taojinbi-shang******'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
}

model QueryGuideItemGroupWithOutInventoryResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemList?: [ 
    {
      customizedAttributeMap?: map[string]any(name='CustomizedAttributeMap'),
      itemId?: string(name='ItemId', example='62785263****'),
      itemTitle?: string(name='ItemTitle'),
      itemUrl?: string(name='ItemUrl', example='https://detail.tmall.com/item.htm?id=670600584601&spm=a21y2.8291224.2879496.9.c6e23569FJRVmu&skuId=500049906****'),
      lmItemId?: string(name='LmItemId', example='10006515-64348848****'),
      mainPicUrl?: string(name='MainPicUrl'),
      pointPrice?: long(name='PointPrice', example='4990'),
      points?: long(name='Points', example='0'),
      pointsAmount?: long(name='PointsAmount', example='0'),
      priceCent?: long(name='PriceCent', example='4990'),
      reservePrice?: string(name='ReservePrice', example='5990'),
      tags?: [ string ](name='Tags'),
      whitePicUrl?: string(name='WhitePicUrl'),
    }
  ](name='ItemList'),
  message?: string(name='Message', example='SUCCESS'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='A7BE4356-7F92-533E-A31B-2EBF2D67****'),
  totalCount?: long(name='TotalCount', example='19'),
}

model QueryGuideItemGroupWithOutInventoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryGuideItemGroupWithOutInventoryResponseBody(name='body'),
}

/**
 * @param request QueryGuideItemGroupWithOutInventoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryGuideItemGroupWithOutInventoryResponse
 */
async function queryGuideItemGroupWithOutInventoryWithOptions(request: QueryGuideItemGroupWithOutInventoryRequest, runtime: Util.RuntimeOptions): QueryGuideItemGroupWithOutInventoryResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryGuideItemGroupWithOutInventory',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryGuideItemGroupWithOutInventoryRequest
 * @return QueryGuideItemGroupWithOutInventoryResponse
 */
async function queryGuideItemGroupWithOutInventory(request: QueryGuideItemGroupWithOutInventoryRequest): QueryGuideItemGroupWithOutInventoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryGuideItemGroupWithOutInventoryWithOptions(request, runtime);
}

model QueryHotMoviesRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  cityCode?: long(name='CityCode', description='This parameter is required.', example='310100'),
  extJson?: string(name='ExtJson', example='{}'),
}

model QueryHotMoviesResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  movies?: {
    movie?: [ 
    {
      backgroundPicture?: string(name='BackgroundPicture', example='""'),
      country?: string(name='Country', example='""'),
      description?: string(name='Description', example='""'),
      director?: string(name='Director', example='""'),
      duration?: long(name='Duration', example='190'),
      highlight?: string(name='Highlight', example='""'),
      id?: long(name='Id', example='5790'),
      language?: string(name='Language', example='""'),
      leadingRole?: string(name='LeadingRole', example='""'),
      movieName?: string(name='MovieName', example='""'),
      movieNameEn?: string(name='MovieNameEn', example='""'),
      movieTypeList?: {
        movieTypeList?: [ string ](name='MovieTypeList')
      }(name='MovieTypeList'),
      movieVersion?: string(name='MovieVersion', example='""'),
      openDay?: string(name='OpenDay', example='2022-04-01 12:00:00'),
      openTime?: string(name='OpenTime', example='2022-04-01 12:00:00'),
      poster?: string(name='Poster', example='""'),
      remark?: string(name='Remark', example='9.7'),
      trailerList?: {
        trailerList?: [ string ](name='TrailerList')
      }(name='TrailerList'),
      type?: string(name='Type'),
    }
  ](name='Movie')
  }(name='Movies'),
  requestId?: string(name='RequestId', example='1AF23E47-D8FB-576A-B069-CA98B4DE****'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
}

model QueryHotMoviesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryHotMoviesResponseBody(name='body'),
}

/**
 * @param request QueryHotMoviesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryHotMoviesResponse
 */
async function queryHotMoviesWithOptions(request: QueryHotMoviesRequest, runtime: Util.RuntimeOptions): QueryHotMoviesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.cityCode)) {
    query['CityCode'] = request.cityCode;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryHotMovies',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryHotMoviesRequest
 * @return QueryHotMoviesResponse
 */
async function queryHotMovies(request: QueryHotMoviesRequest): QueryHotMoviesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryHotMoviesWithOptions(request, runtime);
}

model QueryInventoryOfItemsInBizItemGroupRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  divisionCode?: string(name='DivisionCode', example='510132'),
  itemIds?: [ long ](name='ItemIds'),
  lmItemIds?: [ string ](name='LmItemIds'),
  subBizId?: string(name='SubBizId', description='This parameter is required.', example='52847******1a58205d3ce5e9328'),
}

model QueryInventoryOfItemsInBizItemGroupShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  divisionCode?: string(name='DivisionCode', example='510132'),
  itemIdsShrink?: string(name='ItemIds'),
  lmItemIdsShrink?: string(name='LmItemIds'),
  subBizId?: string(name='SubBizId', description='This parameter is required.', example='52847******1a58205d3ce5e9328'),
}

model QueryInventoryOfItemsInBizItemGroupResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='******058233'),
      lmItemId?: string(name='LmItemId', example='10016572-******058233'),
      quantity?: int32(name='Quantity', example='10000'),
      skuList?: [ 
        {
          quantity?: int32(name='Quantity', example='4100'),
          skuId?: long(name='SkuId', example='467******9928'),
        }
      ](name='SkuList'),
      totalQuantity?: long(name='TotalQuantity', example='5000'),
      totalSoldQuantity?: long(name='TotalSoldQuantity', example='900'),
    }
  ](name='ItemList'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='0F380CB1-BE49-5DF7-B128-63CADB3A12A3'),
}

model QueryInventoryOfItemsInBizItemGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryInventoryOfItemsInBizItemGroupResponseBody(name='body'),
}

/**
 * @param tmpReq QueryInventoryOfItemsInBizItemGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryInventoryOfItemsInBizItemGroupResponse
 */
async function queryInventoryOfItemsInBizItemGroupWithOptions(tmpReq: QueryInventoryOfItemsInBizItemGroupRequest, runtime: Util.RuntimeOptions): QueryInventoryOfItemsInBizItemGroupResponse {
  Util.validateModel(tmpReq);
  var request = new QueryInventoryOfItemsInBizItemGroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.itemIds)) {
    request.itemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.itemIds, 'ItemIds', 'json');
  }
  if (!Util.isUnset(tmpReq.lmItemIds)) {
    request.lmItemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lmItemIds, 'LmItemIds', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryInventoryOfItemsInBizItemGroup',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryInventoryOfItemsInBizItemGroupRequest
 * @return QueryInventoryOfItemsInBizItemGroupResponse
 */
async function queryInventoryOfItemsInBizItemGroup(request: QueryInventoryOfItemsInBizItemGroupRequest): QueryInventoryOfItemsInBizItemGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryInventoryOfItemsInBizItemGroupWithOptions(request, runtime);
}

model QueryItemDetailRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20201228****'),
  itemId?: long(name='ItemId', description='This parameter is required.', example='62501739****'),
  lmItemId?: string(name='LmItemId', example='10000035-61936646****'),
}

model QueryItemDetailResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  item?: {
    canSell?: boolean(name='CanSell', example='true'),
    categoryId?: long(name='CategoryId', example='5001****'),
    centerInventory?: boolean(name='CenterInventory', example='true'),
    customizedAttributeMap?: map[string]any(name='CustomizedAttributeMap', example='{}'),
    descOption?: string(name='DescOption'),
    descPath?: string(name='DescPath'),
    extJson?: string(name='ExtJson', example='{}'),
    iforestProps?: string(name='IforestProps', example='[]'),
    iforestPropsJson?: string(name='IforestPropsJson', example='{}'),
    isCanSell?: boolean(name='IsCanSell', example='true'),
    isSellerPayPostfee?: boolean(name='IsSellerPayPostfee', example='true'),
    itemId?: long(name='ItemId', example='64407904****'),
    itemImages?: {
      itemImage?: [ string ](name='ItemImage')
    }(name='ItemImages'),
    itemTitle?: string(name='ItemTitle'),
    lmItemCategory?: string(name='LmItemCategory', example='entity'),
    lmItemId?: string(name='LmItemId', example='10000043-64818014****'),
    mainPicUrl?: string(name='MainPicUrl'),
    minPoints?: long(name='MinPoints', example='2990'),
    minPrice?: long(name='MinPrice', example='2990'),
    properties?: string(name='Properties', example='{}'),
    propertiesJson?: string(name='PropertiesJson', example='{}'),
    quantity?: int32(name='Quantity', example='1'),
    reservePrice?: long(name='ReservePrice', example='4990'),
    sellerId?: long(name='SellerId', example='424414****'),
    sellerPayPostfee?: boolean(name='SellerPayPostfee', example='true'),
    sellerType?: int32(name='SellerType', example='0'),
    skus?: {
      sku?: [ 
      {
        canSell?: boolean(name='CanSell', example='true'),
        customizedAttributeMap?: map[string]any(name='CustomizedAttributeMap', example='{}'),
        extJson?: string(name='ExtJson', example='{}'),
        itemId?: long(name='ItemId', example='63894836****'),
        lmItemId?: string(name='LmItemId', example='10000102-64426301****'),
        pointPrice?: long(name='PointPrice', example='4990'),
        points?: long(name='Points', example='2499'),
        pointsAmount?: long(name='PointsAmount', example='4490'),
        priceCent?: long(name='PriceCent', example='4990'),
        quantity?: int32(name='Quantity', example='1'),
        reservePrice?: long(name='ReservePrice', example='4490'),
        skuId?: long(name='SkuId', example='456458315****'),
        skuPicUrl?: string(name='SkuPicUrl'),
        skuProperties?: string(name='SkuProperties'),
        skuPropertiesJson?: string(name='SkuPropertiesJson', example='{}'),
        skuTitle?: string(name='SkuTitle'),
      }
    ](name='Sku')
    }(name='Skus'),
    tbShopName?: string(name='TbShopName'),
    totalSoldQuantity?: int32(name='TotalSoldQuantity', example='199'),
    videoPicUrl?: string(name='VideoPicUrl'),
    videoUrl?: string(name='VideoUrl'),
  }(name='Item'),
  message?: string(name='Message', example='BizItemGroup [LMALL20210830****] has not the item [65728655****].'),
  requestId?: string(name='RequestId', example='E46C790E-B1F2-51EF-B6F8-B52404B5****'),
  subCode?: string(name='SubCode', example='1004'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
}

model QueryItemDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryItemDetailResponseBody(name='body'),
}

/**
 * @param request QueryItemDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryItemDetailResponse
 */
async function queryItemDetailWithOptions(request: QueryItemDetailRequest, runtime: Util.RuntimeOptions): QueryItemDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryItemDetail',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryItemDetailRequest
 * @return QueryItemDetailResponse
 */
async function queryItemDetail(request: QueryItemDetailRequest): QueryItemDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryItemDetailWithOptions(request, runtime);
}

model QueryItemDetailInnerRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2021081*****'),
  bizUid?: string(name='BizUid', example='9f99f38030254728***'),
  divisionCode?: string(name='DivisionCode', example='510132'),
  ip?: string(name='Ip', example='49.93.0.222'),
  itemId?: long(name='ItemId', description='This parameter is required.', example='61358168****'),
  lmItemId?: string(name='LmItemId', example='10000055-58233812****'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='9f99f38030254728***'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryItemDetailInnerResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  item?: {
    canSell?: boolean(name='CanSell', example='true'),
    categoryId?: long(name='CategoryId', example='20177****'),
    categoryIds?: [ long ](name='CategoryIds'),
    centerInventory?: boolean(name='CenterInventory', example='true'),
    city?: string(name='City'),
    descOption?: string(name='DescOption', example='"<p><img align=\\\\"absmiddle\\\\" src=\\\\"https://img.alicdn.com/imgextra/i1/1742262291/O1CN01j0oO3L1SnK7EwwXP4_!!1742262291.jpg\\\\" style=\\\\"max-width: none;width: 750.0px;\\\\">"'),
    descPath?: string(name='DescPath'),
    firstPicUrl?: string(name='FirstPicUrl'),
    iforestProps?: [  map[string]any ](name='IforestProps'),
    isCanSell?: boolean(name='IsCanSell', example='true'),
    isSellerPayPostfee?: boolean(name='IsSellerPayPostfee', example='true'),
    itemId?: long(name='ItemId', example='60646253****'),
    itemImages?: [ string ](name='ItemImages'),
    itemTitle?: string(name='ItemTitle'),
    lmItemCategory?: string(name='LmItemCategory', example='entity'),
    lmShopId?: long(name='LmShopId', example='1002****'),
    mainPicUrl?: string(name='MainPicUrl'),
    minPoints?: long(name='MinPoints', example='2990'),
    minPrice?: long(name='MinPrice', example='1990'),
    properties?: map[string]any(name='Properties', example='{}'),
    province?: string(name='Province'),
    quantity?: int32(name='Quantity', example='5000'),
    reservePrice?: long(name='ReservePrice', example='2990'),
    sellerId?: long(name='SellerId', example='329488****'),
    sellerNick?: string(name='SellerNick'),
    sellerPayPostfee?: boolean(name='SellerPayPostfee', example='true'),
    skuPropertys?: [ 
      {
        id?: long(name='Id'),
        text?: string(name='Text'),
        values?: [ 
          {
            id?: long(name='Id'),
            text?: string(name='Text'),
          }
        ](name='Values'),
      }
    ](name='SkuPropertys'),
    skus?: [ 
      {
        extJson?: string(name='ExtJson', example='{"key":"value"}'),
        itemId?: long(name='ItemId', example='62887962****'),
        lmItemId?: string(name='LmItemId', example='10000102-64426301****'),
        pointPrice?: long(name='PointPrice', example='2990'),
        points?: long(name='Points', example='1990'),
        pointsAmount?: long(name='PointsAmount', example='0'),
        priceCent?: long(name='PriceCent', example='2890'),
        quantity?: int32(name='Quantity', example='4100'),
        reservePrice?: long(name='ReservePrice', example='1990'),
        skuDesc?: string(name='SkuDesc', example='""'),
        skuId?: long(name='SkuId', description='skuid', example='465309897****'),
        skuPicUrl?: string(name='SkuPicUrl'),
        skuPvs?: string(name='SkuPvs'),
        skuTitle?: string(name='SkuTitle'),
        status?: int32(name='Status', example='2'),
      }
    ](name='Skus'),
    tbShopName?: string(name='TbShopName'),
    totalSoldQuantity?: int32(name='TotalSoldQuantity', example='1999'),
  }(name='Item'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='BA157565-3358-5D80-9330-************'),
}

model QueryItemDetailInnerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryItemDetailInnerResponseBody(name='body'),
}

/**
 * @param request QueryItemDetailInnerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryItemDetailInnerResponse
 */
async function queryItemDetailInnerWithOptions(request: QueryItemDetailInnerRequest, runtime: Util.RuntimeOptions): QueryItemDetailInnerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.divisionCode)) {
    query['DivisionCode'] = request.divisionCode;
  }
  if (!Util.isUnset(request.ip)) {
    query['Ip'] = request.ip;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryItemDetailInner',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryItemDetailInnerRequest
 * @return QueryItemDetailInnerResponse
 */
async function queryItemDetailInner(request: QueryItemDetailInnerRequest): QueryItemDetailInnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryItemDetailInnerWithOptions(request, runtime);
}

model QueryItemDetailTeaRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20211013****'),
  bizUid?: string(name='BizUid'),
  divisionCode?: string(name='DivisionCode'),
  ip?: string(name='Ip'),
  itemId?: long(name='ItemId', description='This parameter is required.', example='66644894****'),
  lmItemId?: string(name='LmItemId', example='10001036-66644894****'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount'),
  userFlag?: string(name='UserFlag'),
}

model QueryItemDetailTeaResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  item?: {
    canNotBeSoldCode?: string(name='CanNotBeSoldCode'),
    canNotBeSoldMassage?: string(name='CanNotBeSoldMassage'),
    canSell?: boolean(name='CanSell', example='true'),
    categoryId?: long(name='CategoryId', example='20177****'),
    centerInventory?: boolean(name='CenterInventory', example='true'),
    customizedAttributeMap?: map[string]any(name='CustomizedAttributeMap', example='{}'),
    descOption?: string(name='DescOption', example='"<p><img align=\\\\"absmiddle\\\\" src=\\\\"https://img.alicdn.com/imgextra/i1/1742262291/O1CN01j0oO3L1SnK7EwwXP4_!!1742262291.jpg\\\\" style=\\\\"max-width: none;width: 750.0px;\\\\">"'),
    descPath?: string(name='DescPath'),
    extJson?: string(name='ExtJson', example='{\\\\"delivery_version\\\\":\\\\"1\\\\"}'),
    firstPicUrl?: string(name='FirstPicUrl'),
    hasQuantity?: boolean(name='HasQuantity'),
    iforestProps?: {
      iforestProp?: [  map[string]any ](name='IforestProp')
    }(name='IforestProps'),
    isCanSell?: boolean(name='IsCanSell', example='true'),
    isSellerPayPostfee?: boolean(name='IsSellerPayPostfee', example='true'),
    itemId?: long(name='ItemId', example='60646253****'),
    itemImages?: {
      itemImage?: [ string ](name='ItemImage')
    }(name='ItemImages'),
    itemTitle?: string(name='ItemTitle'),
    itemTotalSimpleValue?: string(name='ItemTotalSimpleValue'),
    lmItemCategory?: string(name='LmItemCategory', example='entity'),
    lmItemId?: string(name='LmItemId', example='10000035-61936646****'),
    mainPicUrl?: string(name='MainPicUrl'),
    minPoints?: long(name='MinPoints', example='2990'),
    minPrice?: long(name='MinPrice', example='1990'),
    properties?: map[string]any(name='Properties', example='{}'),
    quantity?: int32(name='Quantity', example='1'),
    reservePrice?: long(name='ReservePrice', example='2990'),
    sellerId?: long(name='SellerId', example='329488****'),
    sellerPayPostfee?: boolean(name='SellerPayPostfee', example='true'),
    sellerType?: int32(name='SellerType', example='0'),
    simpleQuantity?: string(name='SimpleQuantity'),
    skus?: {
      sku?: [ 
      {
        canNotBeSoldCode?: string(name='CanNotBeSoldCode'),
        canNotBeSoldMassage?: string(name='CanNotBeSoldMassage'),
        canSell?: boolean(name='CanSell', example='true'),
        customizedAttributeMap?: map[string]any(name='CustomizedAttributeMap', example='{}'),
        extJson?: string(name='ExtJson', example='{\\\\"delivery_version\\\\":\\\\"1\\\\"}'),
        hasQuantity?: boolean(name='HasQuantity', example='true'),
        itemId?: long(name='ItemId', example='62887962****'),
        lmItemId?: string(name='LmItemId', example='10000102-64426301****'),
        pointPrice?: long(name='PointPrice', example='2990'),
        points?: long(name='Points', example='1990'),
        pointsAmount?: long(name='PointsAmount', example='0'),
        priceCent?: long(name='PriceCent', example='2890'),
        quantity?: int32(name='Quantity', example='4'),
        reservePrice?: long(name='ReservePrice', example='1990'),
        simpleQuantity?: string(name='SimpleQuantity', example='“”'),
        skuId?: long(name='SkuId', example='465309897****'),
        skuPicUrl?: string(name='SkuPicUrl'),
        skuProperties?: map[string]any(name='SkuProperties', example='{}'),
        skuTitle?: string(name='SkuTitle'),
      }
    ](name='Sku')
    }(name='Skus'),
    tbShopName?: string(name='TbShopName'),
    totalSoldQuantity?: int32(name='TotalSoldQuantity', example='1999'),
    totalSoldSimpleQuantity?: string(name='TotalSoldSimpleQuantity'),
    videoPicUrl?: string(name='VideoPicUrl'),
    videoUrl?: string(name='VideoUrl'),
  }(name='Item'),
  message?: string(name='Message', example='The specified parameter lmItemId or itemId value is not valid.'),
  requestId?: string(name='RequestId', example='BA157565-3358-5D80-9330-************'),
  subCode?: string(name='SubCode', example='""'),
  subMessage?: string(name='SubMessage', example='""'),
  success?: boolean(name='Success', example='true'),
}

model QueryItemDetailTeaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryItemDetailTeaResponseBody(name='body'),
}

/**
 * @summary 查询商品详情tea版本
 *
 * @param request QueryItemDetailTeaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryItemDetailTeaResponse
 */
async function queryItemDetailTeaWithOptions(request: QueryItemDetailTeaRequest, runtime: Util.RuntimeOptions): QueryItemDetailTeaResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.divisionCode)) {
    query['DivisionCode'] = request.divisionCode;
  }
  if (!Util.isUnset(request.ip)) {
    query['Ip'] = request.ip;
  }
  if (!Util.isUnset(request.itemId)) {
    query['ItemId'] = request.itemId;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  if (!Util.isUnset(request.userFlag)) {
    query['UserFlag'] = request.userFlag;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryItemDetailTea',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询商品详情tea版本
 *
 * @param request QueryItemDetailTeaRequest
 * @return QueryItemDetailTeaResponse
 */
async function queryItemDetailTea(request: QueryItemDetailTeaRequest): QueryItemDetailTeaResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryItemDetailTeaWithOptions(request, runtime);
}

model QueryItemInSubBizsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20201229****'),
  itemId?: long(name='ItemId', example='57835029****'),
  lmItemId?: string(name='LmItemId', example='10001036-66644894****'),
  subBizIds?: map[string]any(name='SubBizIds', example='["id1","id2"]'),
}

model QueryItemInSubBizsShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20201229****'),
  itemId?: long(name='ItemId', example='57835029****'),
  lmItemId?: string(name='LmItemId', example='10001036-66644894****'),
  subBizIdsShrink?: string(name='SubBizIds', example='["id1","id2"]'),
}

model QueryItemInSubBizsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemBizList?: [ 
    {
      canSell?: boolean(name='CanSell', example='true'),
      categoryId?: long(name='CategoryId', example='50444021'),
      descOption?: string(name='DescOption', example='""'),
      itemId?: long(name='ItemId', example='62503849****'),
      itemImages?: [ string ](name='ItemImages'),
      itemTitle?: string(name='ItemTitle'),
      lmItemId?: string(name='LmItemId', example='10006484-64668317****'),
      mainPicUrl?: string(name='MainPicUrl'),
      propertiesJson?: string(name='PropertiesJson', example='{}'),
      quantity?: long(name='Quantity', example='1'),
      reservePrice?: long(name='ReservePrice', example='2990'),
      sellerId?: long(name='SellerId', example='329488****'),
      skuList?: [ 
        {
          benefitId?: string(name='BenefitId', example='202201050050220000000190****'),
          canSell?: boolean(name='CanSell', example='true'),
          customizedAttributeMap?: map[string]any(name='CustomizedAttributeMap', example='{}'),
          pointPrice?: long(name='PointPrice', example='0'),
          points?: long(name='Points', example='4299'),
          pointsAmount?: long(name='PointsAmount', example='0'),
          priceCent?: long(name='PriceCent', example='1290'),
          reservePrice?: long(name='ReservePrice', example='2990'),
          skuId?: long(name='SkuId', example='474820025****'),
          skuPicUrl?: string(name='SkuPicUrl'),
          skuProperties?: string(name='SkuProperties', example='""'),
          skuPropertiesJson?: string(name='SkuPropertiesJson', example='""'),
          skuTitle?: string(name='SkuTitle'),
        }
      ](name='SkuList'),
      subBizId?: string(name='SubBizId', example='9f65e0905a544924b3cda147f28b****'),
      tbShopName?: string(name='TbShopName'),
    }
  ](name='ItemBizList'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='DFBA1CD4-197E-51BB-A8CE-3A136D0B****'),
}

model QueryItemInSubBizsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryItemInSubBizsResponseBody(name='body'),
}

/**
 * @param tmpReq QueryItemInSubBizsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryItemInSubBizsResponse
 */
async function queryItemInSubBizsWithOptions(tmpReq: QueryItemInSubBizsRequest, runtime: Util.RuntimeOptions): QueryItemInSubBizsResponse {
  Util.validateModel(tmpReq);
  var request = new QueryItemInSubBizsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.subBizIds)) {
    request.subBizIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.subBizIds, 'SubBizIds', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryItemInSubBizs',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryItemInSubBizsRequest
 * @return QueryItemInSubBizsResponse
 */
async function queryItemInSubBizs(request: QueryItemInSubBizsRequest): QueryItemInSubBizsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryItemInSubBizsWithOptions(request, runtime);
}

model QueryItemInventoryRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2******002'),
  divisionCode?: string(name='DivisionCode', description='This parameter is required.', example='410503006'),
  ip?: string(name='Ip', example='113.77.105.73'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='630730743485'),
      lmItemId?: string(name='LmItemId', example='10000710-635764300767'),
      skuIdList?: [ long ](name='SkuIdList'),
    }
  ](name='ItemList', description='This parameter is required.'),
}

model QueryItemInventoryResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemList?: {
    item?: [ 
    {
      itemId?: long(name='ItemId', example='631145057663'),
      lmItemId?: string(name='LmItemId', example='10000710-635764300767'),
      skuList?: {
        sku?: [ 
        {
          inventory?: {
            quantity?: long(name='Quantity', example='1'),
          }(name='Inventory'),
          skuId?: long(name='SkuId', description='skuId', example='4901251235576'),
        }
      ](name='Sku')
      }(name='SkuList'),
    }
  ](name='Item')
  }(name='ItemList'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='1F2E68C6-FD20-5121-89FF-65F555EE1F15'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='True'),
}

model QueryItemInventoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryItemInventoryResponseBody(name='body'),
}

/**
 * @param request QueryItemInventoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryItemInventoryResponse
 */
async function queryItemInventoryWithOptions(request: QueryItemInventoryRequest, runtime: Util.RuntimeOptions): QueryItemInventoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.divisionCode)) {
    query['DivisionCode'] = request.divisionCode;
  }
  if (!Util.isUnset(request.ip)) {
    query['Ip'] = request.ip;
  }
  if (!Util.isUnset(request.itemList)) {
    query['ItemList'] = request.itemList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryItemInventory',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryItemInventoryRequest
 * @return QueryItemInventoryResponse
 */
async function queryItemInventory(request: QueryItemInventoryRequest): QueryItemInventoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryItemInventoryWithOptions(request, runtime);
}

model QueryItemInventoryV2Request {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******01'),
  divisionCode?: string(name='DivisionCode', description='This parameter is required.', example='520300'),
  ip?: string(name='Ip', example='113.77.105.73'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='60843842****'),
      lmItemId?: string(name='LmItemId', example='10000035-61936646****'),
      skuIdList?: [ long ](name='SkuIdList'),
    }
  ](name='ItemList', description='This parameter is required.'),
}

model QueryItemInventoryV2ResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  itemList?: {
    item?: [ 
    {
      itemId?: long(name='ItemId', example='65671280****'),
      lmItemId?: string(name='LmItemId', example='10016572-654408058233'),
      skuList?: {
        sku?: [ 
        {
          inventory?: {
            quantity?: long(name='Quantity', example='10'),
          }(name='Inventory'),
          skuId?: long(name='SkuId', description='skuid', example='482694857****'),
        }
      ](name='Sku')
      }(name='SkuList'),
    }
  ](name='Item')
  }(name='ItemList'),
  message?: string(name='Message', example='The bizId or lmOrderId is mandatory for this action.'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
  subCode?: string(name='SubCode', example='207'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='SUCCESS'),
}

model QueryItemInventoryV2Response = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryItemInventoryV2ResponseBody(name='body'),
}

/**
 * @param request QueryItemInventoryV2Request
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryItemInventoryV2Response
 */
async function queryItemInventoryV2WithOptions(request: QueryItemInventoryV2Request, runtime: Util.RuntimeOptions): QueryItemInventoryV2Response {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.divisionCode)) {
    query['DivisionCode'] = request.divisionCode;
  }
  if (!Util.isUnset(request.ip)) {
    query['Ip'] = request.ip;
  }
  if (!Util.isUnset(request.itemList)) {
    query['ItemList'] = request.itemList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryItemInventoryV2',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryItemInventoryV2Request
 * @return QueryItemInventoryV2Response
 */
async function queryItemInventoryV2(request: QueryItemInventoryV2Request): QueryItemInventoryV2Response {
  var runtime = new Util.RuntimeOptions{};
  return queryItemInventoryV2WithOptions(request, runtime);
}

model QueryItemNextCycleRestrictionRequest {
  bizId?: string(name='BizId', description='This parameter is required.'),
  lmItemId?: [ string ](name='LmItemId', description='This parameter is required.'),
  subBizId?: string(name='SubBizId'),
}

model QueryItemNextCycleRestrictionShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.'),
  lmItemIdShrink?: string(name='LmItemId', description='This parameter is required.'),
  subBizId?: string(name='SubBizId'),
}

model QueryItemNextCycleRestrictionResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  model?: [ 
    {
      beginTime?: long(name='BeginTime'),
      endTime?: long(name='EndTime'),
      itemId?: long(name='ItemId'),
      lmItemId?: string(name='LmItemId'),
      quantity?: int32(name='Quantity'),
      restrictionQuantity?: int32(name='RestrictionQuantity'),
    }
  ](name='Model'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model QueryItemNextCycleRestrictionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryItemNextCycleRestrictionResponseBody(name='body'),
}

/**
 * @summary 查询商品下个限购周期限购信息
 *
 * @param tmpReq QueryItemNextCycleRestrictionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryItemNextCycleRestrictionResponse
 */
async function queryItemNextCycleRestrictionWithOptions(tmpReq: QueryItemNextCycleRestrictionRequest, runtime: Util.RuntimeOptions): QueryItemNextCycleRestrictionResponse {
  Util.validateModel(tmpReq);
  var request = new QueryItemNextCycleRestrictionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.lmItemId)) {
    request.lmItemIdShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lmItemId, 'LmItemId', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.subBizId)) {
    query['SubBizId'] = request.subBizId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.lmItemIdShrink)) {
    body['LmItemId'] = request.lmItemIdShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryItemNextCycleRestriction',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询商品下个限购周期限购信息
 *
 * @param request QueryItemNextCycleRestrictionRequest
 * @return QueryItemNextCycleRestrictionResponse
 */
async function queryItemNextCycleRestriction(request: QueryItemNextCycleRestrictionRequest): QueryItemNextCycleRestrictionResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryItemNextCycleRestrictionWithOptions(request, runtime);
}

model QueryLogisticsRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210830****'),
  bizUid?: string(name='BizUid', example='213250002250****'),
  lmOrderId?: long(name='LmOrderId', example='46802****'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='213250002250****'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryLogisticsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  data?: {
    data?: [ 
    {
      dataProvider?: string(name='DataProvider'),
      dataProviderTitle?: string(name='DataProviderTitle'),
      goods?: {
        goods?: [ 
        {
          goodName?: string(name='GoodName', example='""'),
          itemId?: long(name='ItemId', example='62250669****'),
          quantity?: int32(name='Quantity', example='4'),
        }
      ](name='Goods')
      }(name='Goods'),
      logisticsCompanyCode?: string(name='LogisticsCompanyCode', example='ZTO'),
      logisticsCompanyName?: string(name='LogisticsCompanyName'),
      logisticsDetailList?: {
        logisticsDetailList?: [ 
        {
          ocurrTimeStr?: string(name='OcurrTimeStr', example='2022-04-01'),
          standerdDesc?: string(name='StanderdDesc'),
        }
      ](name='LogisticsDetailList')
      }(name='LogisticsDetailList'),
      mailNo?: string(name='MailNo', example='32178478218****'),
    }
  ](name='Data')
  }(name='Data'),
  message?: string(name='Message', example='The specified parameter %s value is not valid.'),
  requestId?: string(name='RequestId', example='E090F1A0-7454-5F36-933C-E6332CE2****'),
}

model QueryLogisticsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryLogisticsResponseBody(name='body'),
}

/**
 * @param request QueryLogisticsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryLogisticsResponse
 */
async function queryLogisticsWithOptions(request: QueryLogisticsRequest, runtime: Util.RuntimeOptions): QueryLogisticsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryLogistics',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryLogisticsRequest
 * @return QueryLogisticsResponse
 */
async function queryLogistics(request: QueryLogisticsRequest): QueryLogisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryLogisticsWithOptions(request, runtime);
}

model QueryMediaSettleInfoRequest {
  bizId?: string(name='BizId', example='LMALL20******005'),
  channelId?: string(name='ChannelId'),
  endTime?: string(name='EndTime', example='2021-08-01 01:00:00'),
  extInfo?: string(name='ExtInfo'),
  mediaName?: string(name='MediaName'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  settleNo?: string(name='SettleNo'),
  startTime?: string(name='StartTime', example='2021-08-01 00:00:00'),
}

model QueryMediaSettleInfoResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    mediaSettleInfoList?: [ 
      {
        channelId?: string(name='ChannelId', example='63839******79044'),
        createDate?: string(name='CreateDate', example='2021-08-01 00:00:00'),
        endTime?: string(name='EndTime', example='2021-08-01 01:00:00'),
        extInfo?: string(name='ExtInfo'),
        mediaName?: string(name='MediaName'),
        mediaSettleAmount?: string(name='MediaSettleAmount'),
        mediaSettleDetailId?: string(name='MediaSettleDetailId'),
        modifiedDate?: string(name='ModifiedDate', example='2021-08-01 01:00:00'),
        settleNo?: string(name='SettleNo', example='TEST000000'),
        settleStatus?: string(name='SettleStatus', example='waitPayerConfirm'),
        startTime?: string(name='StartTime', example='2021-08-01 00:00:00'),
      }
    ](name='MediaSettleInfoList'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='20'),
    totalCount?: int32(name='TotalCount', example='19'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='FAED4911-3F7D-56C0-880F-C4755D4F26D8'),
  subCode?: string(name='SubCode', example='1004'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model QueryMediaSettleInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryMediaSettleInfoResponseBody(name='body'),
}

/**
 * @param request QueryMediaSettleInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryMediaSettleInfoResponse
 */
async function queryMediaSettleInfoWithOptions(request: QueryMediaSettleInfoRequest, runtime: Util.RuntimeOptions): QueryMediaSettleInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.extInfo)) {
    query['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.mediaName)) {
    query['MediaName'] = request.mediaName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.settleNo)) {
    query['SettleNo'] = request.settleNo;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryMediaSettleInfo',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryMediaSettleInfoRequest
 * @return QueryMediaSettleInfoResponse
 */
async function queryMediaSettleInfo(request: QueryMediaSettleInfoRequest): QueryMediaSettleInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryMediaSettleInfoWithOptions(request, runtime);
}

model QueryMessagesRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2******001'),
  extJson?: string(name='ExtJson'),
  topic?: string(name='Topic', description='This parameter is required.', example='Topic_******_api'),
}

model QueryMessagesResponseBody = {
  bizMessages?: {
    bizMessage?: [ 
    {
      contentMapJson?: string(name='ContentMapJson'),
      dataId?: long(name='DataId'),
      pubTime?: string(name='PubTime'),
      topic?: string(name='Topic', example='Topic_******_api'),
    }
  ](name='BizMessage')
  }(name='BizMessages'),
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
}

model QueryMessagesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryMessagesResponseBody(name='body'),
}

/**
 * @param request QueryMessagesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryMessagesResponse
 */
async function queryMessagesWithOptions(request: QueryMessagesRequest, runtime: Util.RuntimeOptions): QueryMessagesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.topic)) {
    query['Topic'] = request.topic;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryMessages',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryMessagesRequest
 * @return QueryMessagesResponse
 */
async function queryMessages(request: QueryMessagesRequest): QueryMessagesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryMessagesWithOptions(request, runtime);
}

model QueryMovieCommentsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  extJson?: string(name='ExtJson', example='{}'),
  movieId?: long(name='MovieId', description='This parameter is required.', example='""'),
  pageNumber?: long(name='PageNumber', description='This parameter is required.', example='1'),
}

model QueryMovieCommentsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  commentList?: {
    comment?: [ 
    {
      commentTime?: string(name='CommentTime', example='""'),
      content?: string(name='Content', example='""'),
      favorCount?: long(name='FavorCount', example='1000'),
      id?: long(name='Id', example='6331'),
      movieId?: long(name='MovieId', example='""'),
      nickName?: string(name='NickName', example='""'),
      remark?: long(name='Remark', example='9'),
      subject?: string(name='Subject'),
    }
  ](name='Comment')
  }(name='CommentList'),
  count?: long(name='Count', example='1'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='42A19B5E-B9A0-5D41-91D0-CC316A97B92A'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
}

model QueryMovieCommentsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryMovieCommentsResponseBody(name='body'),
}

/**
 * @param request QueryMovieCommentsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryMovieCommentsResponse
 */
async function queryMovieCommentsWithOptions(request: QueryMovieCommentsRequest, runtime: Util.RuntimeOptions): QueryMovieCommentsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.movieId)) {
    query['MovieId'] = request.movieId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryMovieComments',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryMovieCommentsRequest
 * @return QueryMovieCommentsResponse
 */
async function queryMovieComments(request: QueryMovieCommentsRequest): QueryMovieCommentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryMovieCommentsWithOptions(request, runtime);
}

model QueryMovieSchedulesRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  cinemaId?: long(name='CinemaId', description='This parameter is required.'),
  extJson?: string(name='ExtJson'),
}

model QueryMovieSchedulesResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
  schedules?: {
    schedule?: [ 
    {
      cinemaId?: long(name='CinemaId'),
      hallName?: string(name='HallName'),
      id?: long(name='Id'),
      isExpired?: boolean(name='IsExpired', example='false'),
      maxCanBuy?: long(name='MaxCanBuy', example='2'),
      movieId?: long(name='MovieId'),
      movieVersion?: string(name='MovieVersion'),
      price?: long(name='Price', example='5000'),
      releaseDate?: string(name='ReleaseDate'),
      scheduleArea?: string(name='ScheduleArea'),
      sectionId?: string(name='SectionId'),
      serviceFee?: long(name='ServiceFee'),
      sessionEndingTime?: string(name='SessionEndingTime', example='2022-04-01 12:00:00'),
      sessionStartingTime?: string(name='SessionStartingTime', example='2022-04-01 10:00:00'),
    }
  ](name='Schedule')
  }(name='Schedules'),
  subCode?: string(name='SubCode', example='207'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
}

model QueryMovieSchedulesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryMovieSchedulesResponseBody(name='body'),
}

/**
 * @param request QueryMovieSchedulesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryMovieSchedulesResponse
 */
async function queryMovieSchedulesWithOptions(request: QueryMovieSchedulesRequest, runtime: Util.RuntimeOptions): QueryMovieSchedulesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.cinemaId)) {
    query['CinemaId'] = request.cinemaId;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryMovieSchedules',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryMovieSchedulesRequest
 * @return QueryMovieSchedulesResponse
 */
async function queryMovieSchedules(request: QueryMovieSchedulesRequest): QueryMovieSchedulesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryMovieSchedulesWithOptions(request, runtime);
}

model QueryMovieSeatsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******004'),
  extJson?: string(name='ExtJson', example='{}'),
  scheduleId?: long(name='ScheduleId', description='This parameter is required.', example='9******5'),
}

model QueryMovieSeatsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
  seatMap?: {
    maxCanBuy?: long(name='MaxCanBuy', example='2'),
    maxColumn?: long(name='MaxColumn', example='20'),
    maxLeftPx?: long(name='MaxLeftPx', example='30'),
    maxRow?: long(name='MaxRow', example='20'),
    maxTopPx?: long(name='MaxTopPx', example='30'),
    minColumn?: long(name='MinColumn', example='15'),
    minLeftPx?: long(name='MinLeftPx', example='30'),
    minRow?: long(name='MinRow', example='15'),
    minTopPx?: long(name='MinTopPx', example='30'),
    notice?: string(name='Notice', example='""'),
    regular?: boolean(name='Regular', example='true'),
    seatCount?: long(name='SeatCount', example='150'),
    seats?: {
      seat?: [ 
      {
        area?: string(name='Area', example='""'),
        column?: long(name='Column', example='20'),
        extId?: string(name='ExtId', example='""'),
        flag?: long(name='Flag', example='0'),
        leftPx?: long(name='LeftPx', example='30'),
        name?: string(name='Name'),
        row?: long(name='Row', example='20'),
        rowName?: string(name='RowName', example='""'),
        status?: long(name='Status', example='1'),
        topPx?: long(name='TopPx', example='30'),
      }
    ](name='Seat')
    }(name='Seats'),
    soldCount?: long(name='SoldCount', example='50'),
    tipMessage?: string(name='TipMessage'),
  }(name='SeatMap'),
  subCode?: string(name='SubCode', example='1004'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
}

model QueryMovieSeatsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryMovieSeatsResponseBody(name='body'),
}

/**
 * @param request QueryMovieSeatsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryMovieSeatsResponse
 */
async function queryMovieSeatsWithOptions(request: QueryMovieSeatsRequest, runtime: Util.RuntimeOptions): QueryMovieSeatsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.scheduleId)) {
    query['ScheduleId'] = request.scheduleId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryMovieSeats',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryMovieSeatsRequest
 * @return QueryMovieSeatsResponse
 */
async function queryMovieSeats(request: QueryMovieSeatsRequest): QueryMovieSeatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryMovieSeatsWithOptions(request, runtime);
}

model QueryMovieTicketsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='221******8495'),
  extJson?: string(name='ExtJson'),
  orderId?: string(name='OrderId', description='This parameter is required.', example='14******42'),
}

model QueryMovieTicketsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  movieTicket?: {
    returnMessage?: string(name='ReturnMessage'),
    status?: string(name='Status'),
    tbOrderId?: string(name='TbOrderId'),
    ticketContents?: string(name='TicketContents'),
  }(name='MovieTicket'),
  requestId?: string(name='RequestId', example='5E2D59BA-4EB0-45C4-A0D7-D98C1A4B320B'),
  subCode?: string(name='SubCode', example='1004'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
}

model QueryMovieTicketsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryMovieTicketsResponseBody(name='body'),
}

/**
 * @param request QueryMovieTicketsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryMovieTicketsResponse
 */
async function queryMovieTicketsWithOptions(request: QueryMovieTicketsRequest, runtime: Util.RuntimeOptions): QueryMovieTicketsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryMovieTickets',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryMovieTicketsRequest
 * @return QueryMovieTicketsResponse
 */
async function queryMovieTickets(request: QueryMovieTicketsRequest): QueryMovieTicketsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryMovieTicketsWithOptions(request, runtime);
}

model QueryOrderAndPaymentListRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='22******6718'),
  filterOption?: string(name='FilterOption', example='{\\\\"lmOrderList\\\\":[32******46],\\\\"enableStatus\\\\":-1}'),
  pageNumber?: long(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='20'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryOrderAndPaymentListResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmOrderList?: {
    lmOrderList?: [ 
    {
      createDate?: string(name='CreateDate', example='2022-04-01 12:00:00'),
      enableStatus?: int32(name='EnableStatus', example='1'),
      extJson?: string(name='ExtJson'),
      fundStructureModels?: {
        fundStructureModels?: [ 
        {
          fundAmount?: long(name='FundAmount'),
          fundAmountMoney?: long(name='FundAmountMoney'),
          fundType?: string(name='FundType'),
        }
      ](name='FundStructureModels')
      }(name='FundStructureModels'),
      lmOrderId?: long(name='LmOrderId', example='44******82'),
      lmPaymentId?: string(name='LmPaymentId'),
      logisticsStatus?: int32(name='LogisticsStatus', example='3'),
      orderAmount?: long(name='OrderAmount', example='100'),
      orderStatus?: int32(name='OrderStatus', example='6'),
      postFee?: {
        fundAmount?: long(name='FundAmount'),
        fundAmountMoney?: long(name='FundAmountMoney'),
        fundType?: string(name='FundType'),
      }(name='PostFee'),
      shopName?: string(name='ShopName'),
      subOrderList?: {
        subOrderList?: [ 
        {
          enableStatus?: int32(name='EnableStatus', example='0'),
          itemId?: long(name='ItemId', example='656******550'),
          itemPic?: string(name='ItemPic'),
          itemPriceList?: {
            itemPriceList?: [ 
            {
              fundAmount?: long(name='FundAmount'),
              fundAmountMoney?: long(name='FundAmountMoney'),
              fundType?: string(name='FundType'),
            }
          ](name='ItemPriceList')
          }(name='ItemPriceList'),
          itemTitle?: string(name='ItemTitle'),
          lmItemId?: string(name='LmItemId', example='10000055-******135427'),
          lmOrderId?: long(name='LmOrderId', example='39******99'),
          number?: long(name='Number', example='1'),
          orderStatus?: int32(name='OrderStatus', example='6'),
          skuId?: long(name='SkuId', example='471******886'),
          skuName?: string(name='SkuName'),
          tbOrderId?: long(name='TbOrderId', example='13******61284'),
        }
      ](name='SubOrderList')
      }(name='SubOrderList'),
      tbOrderId?: long(name='TbOrderId', example='18******13134'),
    }
  ](name='LmOrderList')
  }(name='LmOrderList'),
  message?: string(name='Message', example='SUCCESS'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  postFee?: {
    fundAmount?: long(name='FundAmount'),
    fundAmountMoney?: long(name='FundAmountMoney'),
    fundType?: string(name='FundType'),
  }(name='PostFee'),
  requestId?: string(name='RequestId', example='3F43129B-020F-5F8A-88B0-9CBDE2AD6F52'),
  totalCount?: long(name='TotalCount', example='5'),
}

model QueryOrderAndPaymentListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderAndPaymentListResponseBody(name='body'),
}

/**
 * @param request QueryOrderAndPaymentListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderAndPaymentListResponse
 */
async function queryOrderAndPaymentListWithOptions(request: QueryOrderAndPaymentListRequest, runtime: Util.RuntimeOptions): QueryOrderAndPaymentListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.filterOption)) {
    query['FilterOption'] = request.filterOption;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderAndPaymentList',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderAndPaymentListRequest
 * @return QueryOrderAndPaymentListResponse
 */
async function queryOrderAndPaymentList(request: QueryOrderAndPaymentListRequest): QueryOrderAndPaymentListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderAndPaymentListWithOptions(request, runtime);
}

model QueryOrderAndPaymentListWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2022***01'),
  filterOption?: string(name='FilterOption', description='This parameter is required.', example='{\\\\"enableStatus\\\\":0,\\\\"lmOrderList\\\\":[424***33]}'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='REAL'),
  tbUserId?: long(name='TbUserId', example='213***3121'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='R213***3121'),
}

model QueryOrderAndPaymentListWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      createTime?: string(name='CreateTime', example='2022-10-11 14:22:21'),
      enableStatus?: int32(name='EnableStatus', example='0'),
      extJson?: string(name='ExtJson', example='{}'),
      fundStructureModels?: [ 
        {
          fundAmount?: long(name='FundAmount', example='500'),
          fundAmountMoney?: long(name='FundAmountMoney', example='500'),
          fundType?: string(name='FundType', example='lmCashCnyPay'),
        }
      ](name='FundStructureModels'),
      lmOrderId?: long(name='LmOrderId', example='45***66'),
      lmPaymentId?: string(name='LmPaymentId', example='324***333'),
      logisticsStatus?: int32(name='LogisticsStatus', example='3'),
      orderAmount?: long(name='OrderAmount', example='500'),
      orderStatus?: int32(name='OrderStatus', example='6'),
      postFee?: {
        fundAmount?: long(name='FundAmount', example='0'),
        fundAmountMoney?: long(name='FundAmountMoney', example='0'),
        fundType?: string(name='FundType', example='lmCashCnyPay'),
      }(name='PostFee'),
      shopName?: string(name='ShopName'),
      subOrderList?: [ 
        {
          enableStatus?: int32(name='EnableStatus', example='0'),
          itemId?: long(name='ItemId', example='68444***5753'),
          itemPic?: string(name='ItemPic', example='https://aliyundoc.com'),
          itemPriceList?: [ 
            {
              fundAmount?: long(name='FundAmount', example='500'),
              fundAmountMoney?: long(name='FundAmountMoney', example='500'),
              fundType?: string(name='FundType', example='lmCashCnyPay'),
            }
          ](name='ItemPriceList'),
          itemTitle?: string(name='ItemTitle'),
          lmItemId?: string(name='LmItemId', example='100***02-68***453'),
          lmOrderId?: long(name='LmOrderId', example='539***44'),
          number?: long(name='Number', example='1'),
          orderStatus?: int32(name='OrderStatus', example='6'),
          skuId?: string(name='SkuId', description='skuId', example='477***60'),
          skuName?: string(name='SkuName', example='500g'),
          tbOrderId?: long(name='TbOrderId', example='32432***324'),
        }
      ](name='SubOrderList'),
      tbOrderId?: long(name='TbOrderId', example='12***113'),
    }
  ](name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='6103AD7B-21***DE-A58D08E8'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model QueryOrderAndPaymentListWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderAndPaymentListWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request QueryOrderAndPaymentListWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderAndPaymentListWithDesignatedTbUidResponse
 */
async function queryOrderAndPaymentListWithDesignatedTbUidWithOptions(request: QueryOrderAndPaymentListWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): QueryOrderAndPaymentListWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.filterOption)) {
    body['FilterOption'] = request.filterOption;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderAndPaymentListWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderAndPaymentListWithDesignatedTbUidRequest
 * @return QueryOrderAndPaymentListWithDesignatedTbUidResponse
 */
async function queryOrderAndPaymentListWithDesignatedTbUid(request: QueryOrderAndPaymentListWithDesignatedTbUidRequest): QueryOrderAndPaymentListWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderAndPaymentListWithDesignatedTbUidWithOptions(request, runtime);
}

model QueryOrderCommissionRateRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='221249435****'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.', example='45******23'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryOrderCommissionRateResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  commissionModels?: [ 
    {
      commissionInfo?: {
        rateConfig?: {
          configs?: [ 
            {
              value?: long(name='Value', example='1000'),
              valueUnit?: string(name='ValueUnit', example='%%'),
            }
          ](name='Configs'),
        }(name='RateConfig'),
        rateType?: string(name='RateType', example='CONSTANT_RATE'),
      }(name='CommissionInfo'),
      lmOrderId?: long(name='LmOrderId', example='45******23'),
    }
  ](name='CommissionModels'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='A7BE4356-7F92-533E-A31B-2EBF2D67****'),
}

model QueryOrderCommissionRateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderCommissionRateResponseBody(name='body'),
}

/**
 * @param request QueryOrderCommissionRateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderCommissionRateResponse
 */
async function queryOrderCommissionRateWithOptions(request: QueryOrderCommissionRateRequest, runtime: Util.RuntimeOptions): QueryOrderCommissionRateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderCommissionRate',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderCommissionRateRequest
 * @return QueryOrderCommissionRateResponse
 */
async function queryOrderCommissionRate(request: QueryOrderCommissionRateRequest): QueryOrderCommissionRateResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderCommissionRateWithOptions(request, runtime);
}

model QueryOrderDetailInnerRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210927****'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='208823220453****'),
  filterOption?: string(name='FilterOption', example='{\\\\"enableStatus\\\\":0,\\\\"lmOrderList\\\\":[42433****]}'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='208823220453****'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryOrderDetailInnerResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='The specified parameter %s value is not valid.'),
  model?: {
    order?: {
      channelBizType?: string(name='ChannelBizType'),
      channelCode?: string(name='ChannelCode', example='*********'),
      channelOrderId?: string(name='ChannelOrderId', example='182378172837****'),
      createDate?: string(name='CreateDate', example='2022-04-01 16:33:23'),
      enableStatus?: int32(name='EnableStatus', example='1'),
      endTime?: long(name='EndTime', example='2022-04-01 17:21:23'),
      eticket?: boolean(name='Eticket'),
      extInfo?: map[string]any(name='ExtInfo', example='{\\\\"key\\\\":\\\\"value\\\\"}'),
      fundStructureModels?: {
        fundStructure?: [ 
        {
          fundAmount?: long(name='FundAmount', example='2990'),
          fundAmountMoney?: long(name='FundAmountMoney', example='2990'),
          fundType?: string(name='FundType', example='POINT_PAY'),
          lmOrderId?: long(name='LmOrderId', example='51855****'),
          tbSubOrderId?: long(name='TbSubOrderId', example='2874823748****'),
        }
      ](name='FundStructure')
      }(name='FundStructureModels'),
      lmOrderId?: long(name='LmOrderId', example='45609****'),
      logisticsAddress?: string(name='LogisticsAddress'),
      logisticsCompName?: string(name='LogisticsCompName'),
      logisticsMobilePhone?: string(name='LogisticsMobilePhone', example='185****4801'),
      logisticsNo?: string(name='LogisticsNo', example='YT217467555****'),
      logisticsStatus?: int32(name='LogisticsStatus', example='2'),
      logisticsStatusDesc?: string(name='LogisticsStatusDesc'),
      logisticsUserName?: string(name='LogisticsUserName'),
      orderAmount?: long(name='OrderAmount', example='2990'),
      orderPayInfo?: string(name='OrderPayInfo', example='""'),
      payStatus?: int32(name='PayStatus', example='2'),
      payWaterStatus?: int32(name='PayWaterStatus'),
      postFee?: {
        fundAmount?: long(name='FundAmount', example='100'),
        fundAmountMoney?: long(name='FundAmountMoney', example='100'),
        fundType?: string(name='FundType', example='POINT_PAY'),
        lmOrderId?: long(name='LmOrderId', example='52312****'),
        tbSubOrderId?: long(name='TbSubOrderId', example='2874823748****'),
      }(name='PostFee'),
      refundStatus?: int32(name='RefundStatus', example='4'),
      resExtInfo?: string(name='ResExtInfo', example='""'),
      sellerId?: long(name='SellerId', example='220941058****'),
      sellerNick?: string(name='SellerNick'),
      shipping?: string(name='Shipping'),
      shopName?: string(name='ShopName'),
      subItemOrderList?: {
        subItemOrder?: [ 
        {
          channelCode?: string(name='ChannelCode', example='*****'),
          itemId?: long(name='ItemId', example='63194403****'),
          itemPic?: string(name='ItemPic'),
          itemPriceInfo?: string(name='ItemPriceInfo', example='""'),
          itemPriceList?: {
            itemPrice?: [ 
            {
              fundAmount?: long(name='FundAmount', example='2990'),
              fundAmountMoney?: long(name='FundAmountMoney', example='2990'),
              fundType?: string(name='FundType', example='POINT_PAY'),
              tbOrderId?: long(name='TbOrderId', example='2547326482****'),
              tbSubOrderId?: long(name='TbSubOrderId', example='2547326482****'),
            }
          ](name='ItemPrice')
          }(name='ItemPriceList'),
          itemTitle?: string(name='ItemTitle'),
          lmItemId?: string(name='LmItemId', example='10000102-61638587****'),
          lmOrderId?: long(name='LmOrderId', example='45609****'),
          number?: int32(name='Number', example='1'),
          payStatus?: int32(name='PayStatus', example='2'),
          skuId?: long(name='SkuId', example='473246257****'),
          skuName?: string(name='SkuName'),
          tbSubOrderId?: long(name='TbSubOrderId', example='2487583728****'),
          totalPaymentInfo?: string(name='TotalPaymentInfo'),
        }
      ](name='SubItemOrder')
      }(name='SubItemOrderList'),
      tbOrderId?: string(name='TbOrderId', example='25343894898952***'),
    }(name='order'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D****'),
}

model QueryOrderDetailInnerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderDetailInnerResponseBody(name='body'),
}

/**
 * @param request QueryOrderDetailInnerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderDetailInnerResponse
 */
async function queryOrderDetailInnerWithOptions(request: QueryOrderDetailInnerRequest, runtime: Util.RuntimeOptions): QueryOrderDetailInnerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.filterOption)) {
    query['FilterOption'] = request.filterOption;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderDetailInner',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderDetailInnerRequest
 * @return QueryOrderDetailInnerResponse
 */
async function queryOrderDetailInner(request: QueryOrderDetailInnerRequest): QueryOrderDetailInnerResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderDetailInnerWithOptions(request, runtime);
}

model QueryOrderIdByPayIdRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='221249435****'),
  paymentId?: string(name='PaymentId', description='This parameter is required.', example='PYPT******9379'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryOrderIdByPayIdResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmOrderIds?: {
    lmOrderIds?: [ 
    {
      lmOrderId?: long(name='LmOrderId', example='45******89'),
    }
  ](name='LmOrderIds')
  }(name='LmOrderIds'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
}

model QueryOrderIdByPayIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderIdByPayIdResponseBody(name='body'),
}

/**
 * @param request QueryOrderIdByPayIdRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderIdByPayIdResponse
 */
async function queryOrderIdByPayIdWithOptions(request: QueryOrderIdByPayIdRequest, runtime: Util.RuntimeOptions): QueryOrderIdByPayIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.paymentId)) {
    query['PaymentId'] = request.paymentId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderIdByPayId',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderIdByPayIdRequest
 * @return QueryOrderIdByPayIdResponse
 */
async function queryOrderIdByPayId(request: QueryOrderIdByPayIdRequest): QueryOrderIdByPayIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderIdByPayIdWithOptions(request, runtime);
}

model QueryOrderInfoAfterSaleRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  channelUserId?: string(name='ChannelUserId', description='This parameter is required.', example='22******323'),
  lmOrderId?: string(name='LmOrderId', description='This parameter is required.', example='40******84'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='22******323'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryOrderInfoAfterSaleResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    cashAmount?: string(name='CashAmount', example='10'),
    createDate?: string(name='CreateDate', example='2022-03-29'),
    extJson?: string(name='ExtJson', example='{}'),
    lmOrderId?: long(name='LmOrderId', example='45******66'),
    logisticsList?: {
      logistics?: [ 
      {
        logisticsCompanyCode?: string(name='LogisticsCompanyCode', example='SF'),
        logisticsCompanyName?: string(name='LogisticsCompanyName'),
        logisticsNo?: string(name='LogisticsNo', example='731******8882'),
        logisticsStatus?: string(name='LogisticsStatus', example='3'),
      }
    ](name='Logistics')
    }(name='LogisticsList'),
    orderStatus?: string(name='OrderStatus', example='6'),
    points?: long(name='Points', example='69'),
    pointsAmount?: long(name='PointsAmount', example='0'),
    refundAmount?: long(name='RefundAmount', example='5'),
    refundPoints?: long(name='RefundPoints', example='10'),
    refundRate?: string(name='RefundRate'),
    refundStatus?: string(name='RefundStatus', example='1'),
    shopName?: string(name='ShopName'),
    shopServiceTelephone?: string(name='ShopServiceTelephone'),
    tbOrderId?: long(name='TbOrderId', example='12******964113'),
    xiaomiCode?: string(name='XiaomiCode', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='A107756D-18BF-56BC-9F33-8DFAA2279F17'),
}

model QueryOrderInfoAfterSaleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderInfoAfterSaleResponseBody(name='body'),
}

/**
 * @param request QueryOrderInfoAfterSaleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderInfoAfterSaleResponse
 */
async function queryOrderInfoAfterSaleWithOptions(request: QueryOrderInfoAfterSaleRequest, runtime: Util.RuntimeOptions): QueryOrderInfoAfterSaleResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderInfoAfterSale',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderInfoAfterSaleRequest
 * @return QueryOrderInfoAfterSaleResponse
 */
async function queryOrderInfoAfterSale(request: QueryOrderInfoAfterSaleRequest): QueryOrderInfoAfterSaleResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderInfoAfterSaleWithOptions(request, runtime);
}

model QueryOrderItemInfoByPaymentIdForAiZhanYouRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='22******85759'),
  paymentId?: string(name='PaymentId', description='This parameter is required.', example='P51M******15'),
}

model QueryOrderItemInfoByPaymentIdForAiZhanYouResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmOrderList?: {
    lmOrderList?: [ 
    {
      itemId?: long(name='ItemId', example='599******711'),
      itemName?: string(name='ItemName'),
      lmItemId?: string(name='LmItemId', example='10000035-******31758'),
      lmOrderId?: long(name='LmOrderId', example='42******18'),
      skuId?: long(name='SkuId', example='433******8350'),
      skuName?: string(name='SkuName'),
    }
  ](name='LmOrderList')
  }(name='LmOrderList'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='DA2554FD-F21F-536F-A7B7-B96C3E5F****'),
}

model QueryOrderItemInfoByPaymentIdForAiZhanYouResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderItemInfoByPaymentIdForAiZhanYouResponseBody(name='body'),
}

/**
 * @param request QueryOrderItemInfoByPaymentIdForAiZhanYouRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderItemInfoByPaymentIdForAiZhanYouResponse
 */
async function queryOrderItemInfoByPaymentIdForAiZhanYouWithOptions(request: QueryOrderItemInfoByPaymentIdForAiZhanYouRequest, runtime: Util.RuntimeOptions): QueryOrderItemInfoByPaymentIdForAiZhanYouResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.paymentId)) {
    query['PaymentId'] = request.paymentId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderItemInfoByPaymentIdForAiZhanYou',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderItemInfoByPaymentIdForAiZhanYouRequest
 * @return QueryOrderItemInfoByPaymentIdForAiZhanYouResponse
 */
async function queryOrderItemInfoByPaymentIdForAiZhanYou(request: QueryOrderItemInfoByPaymentIdForAiZhanYouRequest): QueryOrderItemInfoByPaymentIdForAiZhanYouResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderItemInfoByPaymentIdForAiZhanYouWithOptions(request, runtime);
}

model QueryOrderListRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******005'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='220******311'),
  filterOption?: string(name='FilterOption', example='{\\\\"lmOrderList\\\\":[32******46],\\\\"enableStatus\\\\":-1}'),
  pageNumber?: long(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: long(name='PageSize', description='This parameter is required.', example='20'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryOrderListResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmOrderList?: {
    lmOrderList?: [ 
    {
      createDate?: string(name='CreateDate', example='2022-04-01 12:00:00'),
      enableStatus?: int32(name='EnableStatus', example='0'),
      extJson?: string(name='ExtJson'),
      fundStructureModels?: {
        fundStructureModels?: [ 
        {
          fundAmount?: long(name='FundAmount'),
          fundAmountMoney?: long(name='FundAmountMoney'),
          fundType?: string(name='FundType'),
        }
      ](name='FundStructureModels')
      }(name='FundStructureModels'),
      lmOrderId?: long(name='LmOrderId', example='41******03'),
      logisticsStatus?: int32(name='LogisticsStatus', example='3'),
      orderAmount?: long(name='OrderAmount', example='100'),
      orderStatus?: int32(name='OrderStatus', example='6'),
      postFee?: {
        fundAmount?: long(name='FundAmount'),
        fundAmountMoney?: long(name='FundAmountMoney'),
        fundType?: string(name='FundType'),
      }(name='PostFee'),
      shopName?: string(name='ShopName'),
      subOrderList?: {
        subOrderList?: [ 
        {
          enableStatus?: int32(name='EnableStatus', example='0'),
          itemId?: long(name='ItemId', example='607******466'),
          itemPic?: string(name='ItemPic'),
          itemPriceList?: {
            itemPriceList?: [ 
            {
              fundAmount?: long(name='FundAmount'),
              fundAmountMoney?: long(name='FundAmountMoney'),
              fundType?: string(name='FundType'),
            }
          ](name='ItemPriceList')
          }(name='ItemPriceList'),
          itemTitle?: string(name='ItemTitle'),
          lmItemId?: string(name='LmItemId', example='10000102-******170234'),
          lmOrderId?: long(name='LmOrderId', example='37******63'),
          number?: long(name='Number', example='1'),
          orderStatus?: int32(name='OrderStatus', example='6'),
          skuId?: long(name='SkuId', example='472******6880'),
          skuName?: string(name='SkuName'),
          tbOrderId?: long(name='TbOrderId', example='12******41253'),
        }
      ](name='SubOrderList')
      }(name='SubOrderList'),
      tbOrderId?: long(name='TbOrderId', example='12******41253'),
    }
  ](name='LmOrderList')
  }(name='LmOrderList'),
  message?: string(name='Message', example='SUCCESS'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  postFee?: {
    fundAmount?: long(name='FundAmount'),
    fundAmountMoney?: long(name='FundAmountMoney'),
    fundType?: string(name='FundType'),
  }(name='PostFee'),
  requestId?: string(name='RequestId', example='6EC363BE-9A87-55AA-A9AF-44E77F0EEDCA'),
  totalCount?: long(name='TotalCount', example='19'),
}

model QueryOrderListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderListResponseBody(name='body'),
}

/**
 * @param request QueryOrderListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderListResponse
 */
async function queryOrderListWithOptions(request: QueryOrderListRequest, runtime: Util.RuntimeOptions): QueryOrderListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.filterOption)) {
    query['FilterOption'] = request.filterOption;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderList',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderListRequest
 * @return QueryOrderListResponse
 */
async function queryOrderList(request: QueryOrderListRequest): QueryOrderListResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderListWithOptions(request, runtime);
}

model QueryOrderListWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2022***001'),
  filterOption?: string(name='FilterOption', description='This parameter is required.', example='{\\\\"lmOrderList\\\\":[\\\\"718***37\\\\"]}'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='333***21'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='R333***21'),
}

model QueryOrderListWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      createTime?: string(name='CreateTime', example='2022-10-11 15:21:11'),
      enableStatus?: int32(name='EnableStatus', example='0'),
      extJson?: string(name='ExtJson', example='{}'),
      fundStructureModels?: [ 
        {
          fundAmount?: long(name='FundAmount', example='5000'),
          fundAmountMoney?: long(name='FundAmountMoney', example='5000'),
          fundType?: string(name='FundType', example='lmCashCnyPay'),
        }
      ](name='FundStructureModels'),
      lmOrderId?: long(name='LmOrderId', example='639***718'),
      logisticsStatus?: int32(name='LogisticsStatus', example='2'),
      orderAmount?: long(name='OrderAmount', example='5000'),
      orderStatus?: int32(name='OrderStatus', example='6'),
      postFee?: {
        fundAmount?: long(name='FundAmount', example='0'),
        fundAmountMoney?: long(name='FundAmountMoney', example='0'),
        fundType?: string(name='FundType', example='lmCashCnyPay'),
      }(name='PostFee'),
      shopName?: string(name='ShopName'),
      subOrderList?: [ 
        {
          enableStatus?: int32(name='EnableStatus', example='0'),
          itemId?: long(name='ItemId', example='665***373'),
          itemPic?: string(name='ItemPic', example='https://aliyundoc.com'),
          itemPriceList?: [ 
            {
              fundAmount?: long(name='FundAmount', example='5000'),
              fundAmountMoney?: long(name='FundAmountMoney', example='5000'),
              fundType?: string(name='FundType', example='lmCashCnyPay'),
            }
          ](name='ItemPriceList'),
          itemTitle?: string(name='ItemTitle'),
          lmItemId?: string(name='LmItemId', example='100***02-665***373'),
          lmOrderId?: long(name='LmOrderId', example='559***813'),
          number?: long(name='Number', example='1'),
          orderStatus?: int32(name='OrderStatus', example='6'),
          skuId?: string(name='SkuId', description='skuId', example='496***350'),
          skuName?: string(name='SkuName', example='500g'),
          tbOrderId?: long(name='TbOrderId', example='323***242'),
        }
      ](name='SubOrderList'),
      tbOrderId?: long(name='TbOrderId', example='412******113'),
    }
  ](name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='10'),
  requestId?: string(name='RequestId', example='1EA70857-79***3E-9F0F777180'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model QueryOrderListWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderListWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request QueryOrderListWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderListWithDesignatedTbUidResponse
 */
async function queryOrderListWithDesignatedTbUidWithOptions(request: QueryOrderListWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): QueryOrderListWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.filterOption)) {
    body['FilterOption'] = request.filterOption;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderListWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderListWithDesignatedTbUidRequest
 * @return QueryOrderListWithDesignatedTbUidResponse
 */
async function queryOrderListWithDesignatedTbUid(request: QueryOrderListWithDesignatedTbUidRequest): QueryOrderListWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderListWithDesignatedTbUidWithOptions(request, runtime);
}

model QueryOrderLogisticsRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210825****'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='22378277****'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.', example='42535****'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='22378277****'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryOrderLogisticsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  orderLogistics?: {
    dataProvider?: string(name='DataProvider'),
    dataProviderTitle?: string(name='DataProviderTitle'),
    fetcher?: {
      address?: string(name='Address'),
      name?: string(name='Name'),
      phoneNumber?: string(name='PhoneNumber', example='185****4801'),
      zipCode?: string(name='ZipCode', example='457001'),
    }(name='Fetcher'),
    logisticsCompanyCode?: string(name='LogisticsCompanyCode', example='ZTO'),
    logisticsCompanyName?: string(name='LogisticsCompanyName'),
    logisticsDetailList?: {
      logisticsDetailList?: [ 
      {
        ocurrTimeStr?: string(name='OcurrTimeStr', example='2022-04-01 16:33:23'),
        standerdDesc?: string(name='StanderdDesc'),
        statusIcon?: string(name='StatusIcon', example='""'),
      }
    ](name='LogisticsDetailList')
    }(name='LogisticsDetailList'),
    receiver?: {
      address?: string(name='Address'),
      name?: string(name='Name'),
      phoneNumber?: string(name='PhoneNumber', example='185****4801'),
      zipCode?: string(name='ZipCode', example='457001'),
    }(name='Receiver'),
  }(name='OrderLogistics'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537****'),
}

model QueryOrderLogisticsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderLogisticsResponseBody(name='body'),
}

/**
 * @param request QueryOrderLogisticsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderLogisticsResponse
 */
async function queryOrderLogisticsWithOptions(request: QueryOrderLogisticsRequest, runtime: Util.RuntimeOptions): QueryOrderLogisticsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderLogistics',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderLogisticsRequest
 * @return QueryOrderLogisticsResponse
 */
async function queryOrderLogistics(request: QueryOrderLogisticsRequest): QueryOrderLogisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderLogisticsWithOptions(request, runtime);
}

model QueryOrderLogisticsWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2022***004'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.', example='737***057'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='261***126'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='u***001'),
}

model QueryOrderLogisticsWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      dataProvider?: string(name='DataProvider'),
      dataProviderTitle?: string(name='DataProviderTitle'),
      fetcher?: {
        address?: string(name='Address'),
        name?: string(name='Name'),
        phoneNumber?: string(name='PhoneNumber', example='189***12'),
        requestId?: string(name='RequestId', example='24D184B6-91***B-AC1B8ACED261'),
        zipCode?: string(name='ZipCode', example='450000'),
      }(name='Fetcher'),
      logisticsCompanyCode?: string(name='LogisticsCompanyCode', example='SF'),
      logisticsCompanyName?: string(name='LogisticsCompanyName'),
      logisticsDetailList?: [ 
        {
          ocurrTimeStr?: string(name='OcurrTimeStr', example='2022-02-21 08:23:21'),
          requestId?: string(name='RequestId', example='24D184B6-913***2AB-AC1B8ACED261'),
          standerdDesc?: string(name='StanderdDesc', example='""'),
          statusIcon?: string(name='StatusIcon'),
        }
      ](name='LogisticsDetailList'),
      mailNo?: string(name='MailNo', example='21321***2123'),
      packageGoodItems?: [ 
        {
          itemId?: long(name='ItemId', example='650***2703'),
          lmItemId?: string(name='LmItemId', example='100***39-6046***9180'),
          name?: string(name='Name'),
          quantity?: int32(name='Quantity', example='1'),
        }
      ](name='PackageGoodItems'),
      receiver?: {
        address?: string(name='Address'),
        name?: string(name='Name'),
        phoneNumber?: string(name='PhoneNumber', example='18***00'),
        requestId?: string(name='RequestId', example='24D184B6-91***2AB-AC1B8ACED261'),
        zipCode?: string(name='ZipCode', example='516000'),
      }(name='Receiver'),
      requestId?: string(name='RequestId', example='24D184B6-91***B-AC1B8ACED261'),
    }
  ](name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='1'),
  requestId?: string(name='RequestId', example='24D184B6-9***B-AC1B8ACED261'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model QueryOrderLogisticsWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryOrderLogisticsWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request QueryOrderLogisticsWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryOrderLogisticsWithDesignatedTbUidResponse
 */
async function queryOrderLogisticsWithDesignatedTbUidWithOptions(request: QueryOrderLogisticsWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): QueryOrderLogisticsWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    body['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryOrderLogisticsWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryOrderLogisticsWithDesignatedTbUidRequest
 * @return QueryOrderLogisticsWithDesignatedTbUidResponse
 */
async function queryOrderLogisticsWithDesignatedTbUid(request: QueryOrderLogisticsWithDesignatedTbUidRequest): QueryOrderLogisticsWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryOrderLogisticsWithDesignatedTbUidWithOptions(request, runtime);
}

model QueryRealTbAccountSupportRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20***001'),
}

model QueryRealTbAccountSupportResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: boolean(name='Model', example='true'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='9C3F75C9-16F***2A7-141C33BFC16B'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='5'),
}

model QueryRealTbAccountSupportResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryRealTbAccountSupportResponseBody(name='body'),
}

/**
 * @param request QueryRealTbAccountSupportRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryRealTbAccountSupportResponse
 */
async function queryRealTbAccountSupportWithOptions(request: QueryRealTbAccountSupportRequest, runtime: Util.RuntimeOptions): QueryRealTbAccountSupportResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryRealTbAccountSupport',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryRealTbAccountSupportRequest
 * @return QueryRealTbAccountSupportResponse
 */
async function queryRealTbAccountSupport(request: QueryRealTbAccountSupportRequest): QueryRealTbAccountSupportResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryRealTbAccountSupportWithOptions(request, runtime);
}

model QueryRefundApplicationDetailRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2******0002'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='12******89'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='23******85'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model QueryRefundApplicationDetailResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  refundApplicationDetail?: {
    applyDisputeDesc?: string(name='ApplyDisputeDesc'),
    applyReasonText?: {
      reasonTextId?: long(name='ReasonTextId', example='100005'),
      reasonTips?: string(name='ReasonTips'),
    }(name='ApplyReasonText'),
    bizClaimType?: int32(name='BizClaimType', example='1'),
    disputeCreateTime?: string(name='DisputeCreateTime', example='2022-04-02 10:16:10'),
    disputeDesc?: string(name='DisputeDesc'),
    disputeEndTime?: string(name='DisputeEndTime', example='2022-04-02 10:16:12'),
    disputeId?: long(name='DisputeId', example='141******33'),
    disputeStatus?: int32(name='DisputeStatus'),
    disputeType?: int32(name='DisputeType'),
    lmOrderId?: string(name='LmOrderId', example='46******11'),
    maxRefundFeeData?: {
      maxRefundFee?: int32(name='MaxRefundFee', example='10'),
      minRefundFee?: int32(name='MinRefundFee', example='0'),
    }(name='MaxRefundFeeData'),
    orderLogisticsStatus?: int32(name='OrderLogisticsStatus', example='1'),
    realRefundFee?: long(name='RealRefundFee', example='10'),
    refundFee?: long(name='RefundFee', example='10'),
    refunderAddress?: string(name='RefunderAddress'),
    refunderName?: string(name='RefunderName'),
    refunderTel?: string(name='RefunderTel', example='158****1234'),
    refunderZipCode?: string(name='RefunderZipCode'),
    returnGoodCount?: int32(name='ReturnGoodCount', example='1'),
    returnGoodLogisticsStatus?: int32(name='ReturnGoodLogisticsStatus'),
    sellerAgreeMsg?: string(name='SellerAgreeMsg'),
    sellerRefuseAgreementMessage?: string(name='SellerRefuseAgreementMessage'),
    sellerRefuseReason?: string(name='SellerRefuseReason'),
    subLmOrderId?: string(name='SubLmOrderId', example='44******62'),
  }(name='RefundApplicationDetail'),
  requestId?: string(name='RequestId', example='DAAA6391-3339-5333-9E4D-C71CD26A231F'),
}

model QueryRefundApplicationDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryRefundApplicationDetailResponseBody(name='body'),
}

/**
 * @param request QueryRefundApplicationDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryRefundApplicationDetailResponse
 */
async function queryRefundApplicationDetailWithOptions(request: QueryRefundApplicationDetailRequest, runtime: Util.RuntimeOptions): QueryRefundApplicationDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    query['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryRefundApplicationDetail',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryRefundApplicationDetailRequest
 * @return QueryRefundApplicationDetailResponse
 */
async function queryRefundApplicationDetail(request: QueryRefundApplicationDetailRequest): QueryRefundApplicationDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryRefundApplicationDetailWithOptions(request, runtime);
}

model QueryRefundApplyWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.'),
  tbUserId?: long(name='TbUserId'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.'),
}

model QueryRefundApplyWithDesignatedTbUidResponseBody = {
  code?: string(name='Code'),
  logsId?: string(name='LogsId'),
  message?: string(name='Message'),
  model?: {
    applyDisputeDesc?: string(name='ApplyDisputeDesc'),
    applyReasonText?: {
      proofRequired?: boolean(name='ProofRequired'),
      reasonTextId?: long(name='ReasonTextId'),
      reasonTips?: string(name='ReasonTips'),
      refundDescRequired?: boolean(name='RefundDescRequired'),
    }(name='ApplyReasonText'),
    bizClaimType?: int32(name='BizClaimType'),
    disputeCreateTime?: string(name='DisputeCreateTime'),
    disputeDesc?: string(name='DisputeDesc'),
    disputeEndTime?: string(name='DisputeEndTime'),
    disputeId?: long(name='DisputeId'),
    disputeStatus?: int32(name='DisputeStatus'),
    disputeType?: int32(name='DisputeType'),
    lmOrderId?: string(name='LmOrderId'),
    maxRefundFeeData?: {
      maxRefundFee?: long(name='MaxRefundFee'),
      minRefundFee?: long(name='MinRefundFee'),
    }(name='MaxRefundFeeData'),
    orderLogisticsStatus?: int32(name='OrderLogisticsStatus'),
    realRefundFee?: long(name='RealRefundFee'),
    refundFee?: long(name='RefundFee'),
    refunderAddress?: string(name='RefunderAddress'),
    refunderName?: string(name='RefunderName'),
    refunderTel?: string(name='RefunderTel'),
    refunderZipCode?: string(name='RefunderZipCode'),
    returnGoodCount?: int32(name='ReturnGoodCount'),
    returnGoodLogisticsStatus?: int32(name='ReturnGoodLogisticsStatus'),
    sellerAgreeMsg?: string(name='SellerAgreeMsg'),
    sellerRefuseAgreementMessage?: string(name='SellerRefuseAgreementMessage'),
    sellerRefuseReason?: string(name='SellerRefuseReason'),
    subLmOrderId?: string(name='SubLmOrderId'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  subCode?: string(name='SubCode'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success'),
  totalCount?: long(name='TotalCount'),
}

model QueryRefundApplyWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryRefundApplyWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request QueryRefundApplyWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryRefundApplyWithDesignatedTbUidResponse
 */
async function queryRefundApplyWithDesignatedTbUidWithOptions(request: QueryRefundApplyWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): QueryRefundApplyWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    body['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryRefundApplyWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryRefundApplyWithDesignatedTbUidRequest
 * @return QueryRefundApplyWithDesignatedTbUidResponse
 */
async function queryRefundApplyWithDesignatedTbUid(request: QueryRefundApplyWithDesignatedTbUidRequest): QueryRefundApplyWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryRefundApplyWithDesignatedTbUidWithOptions(request, runtime);
}

model QuerySellerLicenseRequest {
  bizId?: string(name='BizId', example='LMALL20***001'),
  sellerId?: string(name='SellerId', example='220680193****'),
  tenantId?: string(name='TenantId', example='7521****8332932'),
}

model QuerySellerLicenseResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    licenseUrl?: string(name='LicenseUrl'),
    sellerId?: string(name='SellerId', example='221410922****'),
  }(name='Model'),
  requestId?: string(name='RequestId', description='Id of the request', example='5F0A38D5-F981-529A-911E-1B6D55D***'),
}

model QuerySellerLicenseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QuerySellerLicenseResponseBody(name='body'),
}

/**
 * @summary 商家证照查询接口
 *
 * @param request QuerySellerLicenseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QuerySellerLicenseResponse
 */
async function querySellerLicenseWithOptions(request: QuerySellerLicenseRequest, runtime: Util.RuntimeOptions): QuerySellerLicenseResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.sellerId)) {
    body['SellerId'] = request.sellerId;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QuerySellerLicense',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 商家证照查询接口
 *
 * @param request QuerySellerLicenseRequest
 * @return QuerySellerLicenseResponse
 */
async function querySellerLicense(request: QuerySellerLicenseRequest): QuerySellerLicenseResponse {
  var runtime = new Util.RuntimeOptions{};
  return querySellerLicenseWithOptions(request, runtime);
}

model QueryStatementsRequest {
  bizId?: string(name='BizId', example='LMALL20******001'),
  currency?: string(name='Currency'),
  endTime?: string(name='EndTime', example='2021-09-01 00:00:00'),
  extInfo?: string(name='ExtInfo', example='{}'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
  payeeIds?: string(name='PayeeIds', example='""'),
  settleNoes?: string(name='SettleNoes', example='""'),
  settleStatus?: string(name='SettleStatus', example='""'),
  settleType?: string(name='SettleType', example='""'),
  startTime?: string(name='StartTime', example='2021-08-01 00:00:00'),
  tenantId?: string(name='TenantId', description='This parameter is required.', example='18******263'),
}

model QueryStatementsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='20'),
    statementList?: [ 
      {
        attributes?: string(name='Attributes'),
        createDate?: string(name='CreateDate', example='2021-08-01 00:00:00'),
        currency?: string(name='Currency'),
        endTime?: string(name='EndTime', example='2021-09-01 00:00:00'),
        extInfo?: string(name='ExtInfo', example='{}'),
        kpNoGenerateTime?: string(name='KpNoGenerateTime'),
        modifiedDate?: string(name='ModifiedDate', example='2021-09-01 00:00:00'),
        payeeAccountId?: string(name='PayeeAccountId', example='""'),
        payeeAccountName?: string(name='PayeeAccountName'),
        payeeAccountNo?: string(name='PayeeAccountNo'),
        payeeId?: string(name='PayeeId'),
        payeeName?: string(name='PayeeName', example='""'),
        settleAmount?: string(name='SettleAmount', example='10'),
        settleNo?: string(name='SettleNo', example='TEST000000'),
        settleStatus?: string(name='SettleStatus', example='""'),
        startTime?: string(name='StartTime', example='2021-08-01 00:00:00'),
        statusMessage?: string(name='StatusMessage', example='""'),
        tenantId?: string(name='TenantId', example='18******263'),
      }
    ](name='StatementList'),
    totalCount?: int32(name='TotalCount', example='19'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='85729953-3123-5565-B3CA-493CCF25457B'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage', example='""'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model QueryStatementsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryStatementsResponseBody(name='body'),
}

/**
 * @param request QueryStatementsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryStatementsResponse
 */
async function queryStatementsWithOptions(request: QueryStatementsRequest, runtime: Util.RuntimeOptions): QueryStatementsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.currency)) {
    query['Currency'] = request.currency;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.extInfo)) {
    query['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.payeeIds)) {
    query['PayeeIds'] = request.payeeIds;
  }
  if (!Util.isUnset(request.settleNoes)) {
    query['SettleNoes'] = request.settleNoes;
  }
  if (!Util.isUnset(request.settleStatus)) {
    query['SettleStatus'] = request.settleStatus;
  }
  if (!Util.isUnset(request.settleType)) {
    query['SettleType'] = request.settleType;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.tenantId)) {
    query['TenantId'] = request.tenantId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryStatements',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryStatementsRequest
 * @return QueryStatementsResponse
 */
async function queryStatements(request: QueryStatementsRequest): QueryStatementsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryStatementsWithOptions(request, runtime);
}

model QuerySupplierItemBillDownloadUrlRequest {
  billId?: string(name='BillId', example='BILL-10000007371****'),
  billPeriod?: string(name='BillPeriod', example='2022-12'),
  billStatus?: string(name='BillStatus', example='billGenerated'),
  bizId?: string(name='BizId', example='LMALL20***003'),
  bizName?: string(name='BizName'),
  lmShopId?: long(name='LmShopId', example='1002****'),
  lmShopName?: string(name='LmShopName'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='20'),
}

model QuerySupplierItemBillDownloadUrlResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='The  BillPeriod is mandatory for this action.'),
  model?: {
    data?: [ 
      {
        billId?: string(name='BillId', example='BILL-1000*****00139120150'),
        fileDownloadUrl?: string(name='FileDownloadUrl', example='http://linkedmall-product.oss-cn-hangzhou.aliyuncs.com/LMALL2*****60001/2619709162****'),
        message?: string(name='Message'),
      }
    ](name='Data'),
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='20'),
    total?: int32(name='Total', example='685'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='3B55509D-20AC-5BD5-9A81-D6B7382E****'),
}

model QuerySupplierItemBillDownloadUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QuerySupplierItemBillDownloadUrlResponseBody(name='body'),
}

/**
 * @param request QuerySupplierItemBillDownloadUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QuerySupplierItemBillDownloadUrlResponse
 */
async function querySupplierItemBillDownloadUrlWithOptions(request: QuerySupplierItemBillDownloadUrlRequest, runtime: Util.RuntimeOptions): QuerySupplierItemBillDownloadUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.billId)) {
    body['BillId'] = request.billId;
  }
  if (!Util.isUnset(request.billPeriod)) {
    body['BillPeriod'] = request.billPeriod;
  }
  if (!Util.isUnset(request.billStatus)) {
    body['BillStatus'] = request.billStatus;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizName)) {
    body['BizName'] = request.bizName;
  }
  if (!Util.isUnset(request.lmShopId)) {
    body['LmShopId'] = request.lmShopId;
  }
  if (!Util.isUnset(request.lmShopName)) {
    body['LmShopName'] = request.lmShopName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QuerySupplierItemBillDownloadUrl',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QuerySupplierItemBillDownloadUrlRequest
 * @return QuerySupplierItemBillDownloadUrlResponse
 */
async function querySupplierItemBillDownloadUrl(request: QuerySupplierItemBillDownloadUrlRequest): QuerySupplierItemBillDownloadUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return querySupplierItemBillDownloadUrlWithOptions(request, runtime);
}

model QueryUnfinishedActivitiesRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
}

model QueryUnfinishedActivitiesResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmActivityModelExtList?: {
    lmActivityModelV2Ext?: [ 
    {
      activityPicUrl?: string(name='ActivityPicUrl'),
      bizId?: string(name='BizId', example='LMALL20******002'),
      description?: string(name='Description'),
      endDate?: string(name='EndDate', example='2022-01-14 23:59:59'),
      lmActivityId?: long(name='LmActivityId', example='679'),
      lmActivitySessionModels?: {
        lmActivitySessionModel?: [ 
        {
          bizId?: string(name='BizId', example='LMALL20******001'),
          description?: string(name='Description'),
          displayDate?: string(name='DisplayDate', example='2022-03-08 18:59:59'),
          endDate?: string(name='EndDate', example='2022-03-09 18:59:59'),
          extInfo?: map[string]any(name='ExtInfo'),
          lmActivityId?: long(name='LmActivityId', example='679'),
          lmSessionId?: long(name='LmSessionId'),
          name?: string(name='Name'),
          startDate?: string(name='StartDate', example='2022-03-08 00:00:00'),
          subBizCode?: string(name='SubBizCode', example='3a92eb6******54005be358a43bd'),
        }
      ](name='LmActivitySessionModel')
      }(name='LmActivitySessionModels'),
      name?: string(name='Name'),
      startDate?: string(name='StartDate', example='2022-03-09 11:17:38'),
    }
  ](name='LmActivityModelV2Ext')
  }(name='LmActivityModelExtList'),
  message?: string(name='Message', example='SUCCESS'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='AB121F3E-607D-5EC3-A09B-7B54B86D9154'),
  totalCount?: long(name='TotalCount', example='5'),
}

model QueryUnfinishedActivitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUnfinishedActivitiesResponseBody(name='body'),
}

/**
 * @param request QueryUnfinishedActivitiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUnfinishedActivitiesResponse
 */
async function queryUnfinishedActivitiesWithOptions(request: QueryUnfinishedActivitiesRequest, runtime: Util.RuntimeOptions): QueryUnfinishedActivitiesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUnfinishedActivities',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryUnfinishedActivitiesRequest
 * @return QueryUnfinishedActivitiesResponse
 */
async function queryUnfinishedActivities(request: QueryUnfinishedActivitiesRequest): QueryUnfinishedActivitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUnfinishedActivitiesWithOptions(request, runtime);
}

model QueryUnfinishedSessionsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210802****'),
  pageNumber?: int32(name='PageNumber', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='20'),
  queryTime?: long(name='QueryTime', example='1637294220'),
}

model QueryUnfinishedSessionsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmActivitySessionModelList?: {
    lmActivitySessionModel?: [ 
    {
      bizId?: string(name='BizId', example='LMALL20211013****'),
      description?: string(name='Description', example='""'),
      displayDate?: string(name='DisplayDate', example='2017-11-30 23:59:59'),
      endDate?: string(name='EndDate', example='2017-11-30 23:59:59'),
      lmActivityId?: long(name='LmActivityId', example='679'),
      lmSessionId?: long(name='LmSessionId'),
      name?: string(name='Name'),
      startDate?: string(name='StartDate', example='2021-05-01 00:00:00'),
      subBizCode?: string(name='SubBizCode', example='04fe37ad2d7c42a3b215ff3a5a9*****'),
    }
  ](name='LmActivitySessionModel')
  }(name='LmActivitySessionModelList'),
  message?: string(name='Message', example='SUCCESS'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='BA157565-3358-5D80-9330-************'),
  totalCount?: long(name='TotalCount', example='5'),
}

model QueryUnfinishedSessionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUnfinishedSessionsResponseBody(name='body'),
}

/**
 * @param request QueryUnfinishedSessionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUnfinishedSessionsResponse
 */
async function queryUnfinishedSessionsWithOptions(request: QueryUnfinishedSessionsRequest, runtime: Util.RuntimeOptions): QueryUnfinishedSessionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryTime)) {
    query['QueryTime'] = request.queryTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUnfinishedSessions',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryUnfinishedSessionsRequest
 * @return QueryUnfinishedSessionsResponse
 */
async function queryUnfinishedSessions(request: QueryUnfinishedSessionsRequest): QueryUnfinishedSessionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUnfinishedSessionsWithOptions(request, runtime);
}

model QueryUnfinishedSessions4ItemsRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  itemIds?: map[string]any(name='ItemIds', example='[\\\\"60716881****\\\\",\\\\"59183191****\\\\"]'),
  lmItemIds?: map[string]any(name='LmItemIds', example='[\\\\"10000230-60716881****\\\\",\\\\"10000021-59183191****\\\\"]'),
  queryTime?: long(name='QueryTime', example='1637294220'),
}

model QueryUnfinishedSessions4ItemsShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  itemIdsShrink?: string(name='ItemIds', example='[\\\\"60716881****\\\\",\\\\"59183191****\\\\"]'),
  lmItemIdsShrink?: string(name='LmItemIds', example='[\\\\"10000230-60716881****\\\\",\\\\"10000021-59183191****\\\\"]'),
  queryTime?: long(name='QueryTime', example='1637294220'),
}

model QueryUnfinishedSessions4ItemsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  lmItemActivitySessionModelListList?: {
    lmItemActivitySessionModelList?: [ 
    {
      itemId?: long(name='ItemId', example='60716881****'),
      lmActivitySessionModels?: {
        lmActivitySessionModel?: [ 
        {
          bizId?: string(name='BizId', example='LMALL20******001'),
          description?: string(name='Description'),
          displayDate?: string(name='DisplayDate', example='2022-03-30 13:53:00'),
          endDate?: string(name='EndDate', example='2022-04-01 00:00:00'),
          extInfo?: map[string]any(name='ExtInfo'),
          lmActivityId?: long(name='LmActivityId', example='679'),
          lmSessionId?: long(name='LmSessionId'),
          name?: string(name='Name'),
          startDate?: string(name='StartDate', example='2022-03-30 14:00:00'),
          subBizCode?: string(name='SubBizCode', example='cf5eddd******105378a3ea27b67'),
        }
      ](name='LmActivitySessionModel')
      }(name='LmActivitySessionModels'),
      lmItemId?: string(name='LmItemId', example='10000230-60716881****'),
    }
  ](name='LmItemActivitySessionModelList')
  }(name='LmItemActivitySessionModelListList'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='A209C555-3869-5259-9880-9747CBDA2B89'),
}

model QueryUnfinishedSessions4ItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUnfinishedSessions4ItemsResponseBody(name='body'),
}

/**
 * @param tmpReq QueryUnfinishedSessions4ItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUnfinishedSessions4ItemsResponse
 */
async function queryUnfinishedSessions4ItemsWithOptions(tmpReq: QueryUnfinishedSessions4ItemsRequest, runtime: Util.RuntimeOptions): QueryUnfinishedSessions4ItemsResponse {
  Util.validateModel(tmpReq);
  var request = new QueryUnfinishedSessions4ItemsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.itemIds)) {
    request.itemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.itemIds, 'ItemIds', 'json');
  }
  if (!Util.isUnset(tmpReq.lmItemIds)) {
    request.lmItemIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.lmItemIds, 'LmItemIds', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.itemIdsShrink)) {
    query['ItemIds'] = request.itemIdsShrink;
  }
  if (!Util.isUnset(request.lmItemIdsShrink)) {
    query['LmItemIds'] = request.lmItemIdsShrink;
  }
  if (!Util.isUnset(request.queryTime)) {
    query['QueryTime'] = request.queryTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUnfinishedSessions4Items',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryUnfinishedSessions4ItemsRequest
 * @return QueryUnfinishedSessions4ItemsResponse
 */
async function queryUnfinishedSessions4Items(request: QueryUnfinishedSessions4ItemsRequest): QueryUnfinishedSessions4ItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUnfinishedSessions4ItemsWithOptions(request, runtime);
}

model QueryUpcomingMoviesRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  cityCode?: long(name='CityCode', description='This parameter is required.', example='110100'),
  extJson?: map[string]any(name='ExtJson', example='{}'),
}

model QueryUpcomingMoviesShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  cityCode?: long(name='CityCode', description='This parameter is required.', example='110100'),
  extJsonShrink?: string(name='ExtJson', example='{}'),
}

model QueryUpcomingMoviesResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  movies?: {
    movie?: [ 
    {
      backgroundPicture?: string(name='BackgroundPicture'),
      country?: string(name='Country', example='""'),
      description?: string(name='Description'),
      director?: string(name='Director'),
      duration?: long(name='Duration', example='190'),
      highlight?: string(name='Highlight', example='""'),
      id?: long(name='Id', example='1159177'),
      language?: string(name='Language', example='""'),
      leadingRole?: string(name='LeadingRole', example='""'),
      movieName?: string(name='MovieName', example='""'),
      movieNameEn?: string(name='MovieNameEn', example='""'),
      movieTypeList?: string(name='MovieTypeList'),
      movieVersion?: string(name='MovieVersion'),
      openDay?: string(name='OpenDay'),
      openTime?: string(name='OpenTime', example='2022-04-01 12:00:00'),
      poster?: string(name='Poster', example='""'),
      remark?: string(name='Remark', example='9.6'),
      trailerList?: string(name='TrailerList', example='[]'),
      type?: string(name='Type'),
    }
  ](name='Movie')
  }(name='Movies'),
  requestId?: string(name='RequestId', example='9681B75A-1BE4-57D2-8C03-5B6BEF29378D'),
  subCode?: string(name='SubCode', example='208'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='16'),
}

model QueryUpcomingMoviesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUpcomingMoviesResponseBody(name='body'),
}

/**
 * @param tmpReq QueryUpcomingMoviesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUpcomingMoviesResponse
 */
async function queryUpcomingMoviesWithOptions(tmpReq: QueryUpcomingMoviesRequest, runtime: Util.RuntimeOptions): QueryUpcomingMoviesResponse {
  Util.validateModel(tmpReq);
  var request = new QueryUpcomingMoviesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extJson)) {
    request.extJsonShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extJson, 'ExtJson', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.cityCode)) {
    query['CityCode'] = request.cityCode;
  }
  if (!Util.isUnset(request.extJsonShrink)) {
    query['ExtJson'] = request.extJsonShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUpcomingMovies',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryUpcomingMoviesRequest
 * @return QueryUpcomingMoviesResponse
 */
async function queryUpcomingMovies(request: QueryUpcomingMoviesRequest): QueryUpcomingMoviesResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUpcomingMoviesWithOptions(request, runtime);
}

model QueryUserAccountRequest {
  bizId?: string(name='BizId', description='This parameter is required.'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.'),
}

model QueryUserAccountResponseBody = {
  code?: string(name='Code'),
  logsId?: string(name='LogsId'),
  message?: string(name='Message'),
  model?: {
    bizId?: string(name='BizId'),
    CUserId?: string(name='CUserId'),
    extInfo?: string(name='ExtInfo'),
    lmUid?: long(name='LmUid'),
    requestId?: string(name='RequestId'),
    tbAccountType?: string(name='TbAccountType'),
    tbUserId?: long(name='TbUserId'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  subCode?: string(name='SubCode'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success'),
  totalCount?: long(name='TotalCount'),
}

model QueryUserAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserAccountResponseBody(name='body'),
}

/**
 * @param request QueryUserAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserAccountResponse
 */
async function queryUserAccountWithOptions(request: QueryUserAccountRequest, runtime: Util.RuntimeOptions): QueryUserAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserAccount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryUserAccountRequest
 * @return QueryUserAccountResponse
 */
async function queryUserAccount(request: QueryUserAccountRequest): QueryUserAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserAccountWithOptions(request, runtime);
}

model QueryUserGameProcessRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
  processId?: string(name='ProcessId', description='This parameter is required.', example='6******352'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******372'),
}

model QueryUserGameProcessShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  extInfoShrink?: string(name='ExtInfo', example='{"key":"value"}'),
  processId?: string(name='ProcessId', description='This parameter is required.', example='6******352'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******372'),
}

model QueryUserGameProcessResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    activityId?: string(name='ActivityId', example='134'),
    createTime?: long(name='CreateTime', example='1638451941000'),
    currentShowContent?: string(name='CurrentShowContent', example='""'),
    currentStepId?: string(name='CurrentStepId', example='""'),
    currentStepStatus?: string(name='CurrentStepStatus', example='""'),
    desc?: string(name='Desc', example='""'),
    extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
    gameId?: string(name='GameId', example='6******723'),
    modifyTime?: long(name='ModifyTime', example='1648451941000'),
    name?: string(name='Name', example='""'),
    processId?: string(name='ProcessId', example='6******352'),
    routeId?: string(name='RouteId', example='RouteId_1'),
    status?: string(name='Status', example='""'),
    type?: string(name='Type', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='45B9EF4E-4D18-59B2-85E6-9B568F73C79D'),
}

model QueryUserGameProcessResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserGameProcessResponseBody(name='body'),
}

/**
 * @summary 查询用户活动玩法进度
 *
 * @param tmpReq QueryUserGameProcessRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserGameProcessResponse
 */
async function queryUserGameProcessWithOptions(tmpReq: QueryUserGameProcessRequest, runtime: Util.RuntimeOptions): QueryUserGameProcessResponse {
  Util.validateModel(tmpReq);
  var request = new QueryUserGameProcessShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.processId)) {
    query['ProcessId'] = request.processId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserGameProcess',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户活动玩法进度
 *
 * @param request QueryUserGameProcessRequest
 * @return QueryUserGameProcessResponse
 */
async function queryUserGameProcess(request: QueryUserGameProcessRequest): QueryUserGameProcessResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserGameProcessWithOptions(request, runtime);
}

model QueryUserPointRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******3646'),
}

model QueryUserPointShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  extInfoShrink?: string(name='ExtInfo', example='{"key":"value"}'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******3646'),
}

model QueryUserPointResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    accountId?: string(name='AccountId', example='11******466'),
    bizId?: string(name='BizId', example='LMALL20******008'),
    bizUid?: string(name='BizUid', example='22******3646'),
    createTime?: long(name='CreateTime', example='1639037068811'),
    currentAmount?: long(name='CurrentAmount', example='1000'),
    frozenAmount?: long(name='FrozenAmount', example='4000'),
    historyAmount?: long(name='HistoryAmount', example='5000'),
    level?: string(name='Level', example='1'),
    modifyTime?: long(name='ModifyTime', example='1642662319000'),
    status?: string(name='Status', example='4'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
}

model QueryUserPointResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserPointResponseBody(name='body'),
}

/**
 * @summary LM查询用户积分
 *
 * @param tmpReq QueryUserPointRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserPointResponse
 */
async function queryUserPointWithOptions(tmpReq: QueryUserPointRequest, runtime: Util.RuntimeOptions): QueryUserPointResponse {
  Util.validateModel(tmpReq);
  var request = new QueryUserPointShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserPoint',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary LM查询用户积分
 *
 * @param request QueryUserPointRequest
 * @return QueryUserPointResponse
 */
async function queryUserPoint(request: QueryUserPointRequest): QueryUserPointResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryUserPointWithOptions(request, runtime);
}

model QueryWithholdTradeRequest {
  merchantId?: string(name='MerchantId', example='64******721'),
  outTradeNo?: string(name='OutTradeNo', example='""'),
  tradeNo?: string(name='TradeNo', example='""'),
}

model QueryWithholdTradeResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  queryWithholdTradeResponse?: {
    outTradeNo?: string(name='OutTradeNo', example='""'),
    paymentDate?: string(name='PaymentDate'),
    settleStatus?: string(name='SettleStatus', example='""'),
    totalAmount?: string(name='TotalAmount', example='1000'),
    tradeNo?: string(name='TradeNo', example='""'),
    tradeStatus?: string(name='TradeStatus', example='""'),
  }(name='QueryWithholdTradeResponse'),
  requestId?: string(name='RequestId', example='0825B1A4-0870-50BD-8AA3-9618587BEBC2'),
}

model QueryWithholdTradeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryWithholdTradeResponseBody(name='body'),
}

/**
 * @param request QueryWithholdTradeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryWithholdTradeResponse
 */
async function queryWithholdTradeWithOptions(request: QueryWithholdTradeRequest, runtime: Util.RuntimeOptions): QueryWithholdTradeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.merchantId)) {
    body['MerchantId'] = request.merchantId;
  }
  if (!Util.isUnset(request.outTradeNo)) {
    body['OutTradeNo'] = request.outTradeNo;
  }
  if (!Util.isUnset(request.tradeNo)) {
    body['TradeNo'] = request.tradeNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryWithholdTrade',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request QueryWithholdTradeRequest
 * @return QueryWithholdTradeResponse
 */
async function queryWithholdTrade(request: QueryWithholdTradeRequest): QueryWithholdTradeResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryWithholdTradeWithOptions(request, runtime);
}

model RebindTbAccountRequest {
  bizId?: string(name='BizId', description='This parameter is required.'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.'),
  tbUserId?: long(name='TbUserId'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.'),
}

model RebindTbAccountResponseBody = {
  code?: string(name='Code'),
  logsId?: string(name='LogsId'),
  message?: string(name='Message'),
  model?: {
    bizId?: string(name='BizId'),
    CUserId?: string(name='CUserId'),
    extInfo?: string(name='ExtInfo'),
    lmUid?: long(name='LmUid'),
    requestId?: string(name='RequestId'),
    tbAccountType?: string(name='TbAccountType'),
    tbUserId?: long(name='TbUserId'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  subCode?: string(name='SubCode'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success'),
  totalCount?: long(name='TotalCount'),
}

model RebindTbAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RebindTbAccountResponseBody(name='body'),
}

/**
 * @param request RebindTbAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RebindTbAccountResponse
 */
async function rebindTbAccountWithOptions(request: RebindTbAccountRequest, runtime: Util.RuntimeOptions): RebindTbAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RebindTbAccount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RebindTbAccountRequest
 * @return RebindTbAccountResponse
 */
async function rebindTbAccount(request: RebindTbAccountRequest): RebindTbAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return rebindTbAccountWithOptions(request, runtime);
}

model RefreshSettlementOrderAccountRequest {
  accountId?: string(name='AccountId', example='709447***856069'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210125****'),
  extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
  tenantId?: string(name='TenantId', example='7521****8332932'),
}

model RefreshSettlementOrderAccountResponseBody = {
  code?: string(name='Code', example='0000'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: [ 
    {
      accountNo?: string(name='AccountNo', example='15******65'),
      message?: string(name='Message', example='Success'),
      result?: string(name='Result'),
      settleNo?: string(name='SettleNo', example='TEST000000'),
    }
  ](name='Model'),
  requestId?: string(name='RequestId', example='719E8348-72BD-581E-971F-467***6C908'),
  subCode?: string(name='SubCode', example='1004'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
}

model RefreshSettlementOrderAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RefreshSettlementOrderAccountResponseBody(name='body'),
}

/**
 * @summary 刷新在途结算单的结算账号
 *
 * @param request RefreshSettlementOrderAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RefreshSettlementOrderAccountResponse
 */
async function refreshSettlementOrderAccountWithOptions(request: RefreshSettlementOrderAccountRequest, runtime: Util.RuntimeOptions): RefreshSettlementOrderAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountId)) {
    body['AccountId'] = request.accountId;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.tenantId)) {
    body['TenantId'] = request.tenantId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RefreshSettlementOrderAccount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 刷新在途结算单的结算账号
 *
 * @param request RefreshSettlementOrderAccountRequest
 * @return RefreshSettlementOrderAccountResponse
 */
async function refreshSettlementOrderAccount(request: RefreshSettlementOrderAccountRequest): RefreshSettlementOrderAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return refreshSettlementOrderAccountWithOptions(request, runtime);
}

model RefundOrderRequest {
  extInfo?: string(name='ExtInfo', example='{}'),
  merchantId?: string(name='MerchantId', example='64******721'),
  outRequestNo?: string(name='OutRequestNo', example='4111584A-44D8-49B6-80BD-FACD0726054C'),
  outTradeNo?: string(name='OutTradeNo', example='23******32727'),
  refundAmount?: string(name='RefundAmount', example='100'),
  refundReason?: string(name='RefundReason'),
  refundRoyaltyParameters?: string(name='RefundRoyaltyParameters'),
  tradeNo?: string(name='TradeNo', example='WH******27'),
}

model RefundOrderResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  refundResponse?: {
    fundChange?: string(name='FundChange'),
    gmtRefundPay?: string(name='GmtRefundPay'),
    outRequestNo?: string(name='OutRequestNo', example='4111584A-44D8-49B6-80BD-FACD0726054C'),
    outTradeNo?: string(name='OutTradeNo', example='23******32727'),
    tradeNo?: string(name='TradeNo'),
  }(name='RefundResponse'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
}

model RefundOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RefundOrderResponseBody(name='body'),
}

/**
 * @param request RefundOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RefundOrderResponse
 */
async function refundOrderWithOptions(request: RefundOrderRequest, runtime: Util.RuntimeOptions): RefundOrderResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.merchantId)) {
    body['MerchantId'] = request.merchantId;
  }
  if (!Util.isUnset(request.outRequestNo)) {
    body['OutRequestNo'] = request.outRequestNo;
  }
  if (!Util.isUnset(request.outTradeNo)) {
    body['OutTradeNo'] = request.outTradeNo;
  }
  if (!Util.isUnset(request.refundAmount)) {
    body['RefundAmount'] = request.refundAmount;
  }
  if (!Util.isUnset(request.refundReason)) {
    body['RefundReason'] = request.refundReason;
  }
  if (!Util.isUnset(request.refundRoyaltyParameters)) {
    body['RefundRoyaltyParameters'] = request.refundRoyaltyParameters;
  }
  if (!Util.isUnset(request.tradeNo)) {
    body['TradeNo'] = request.tradeNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RefundOrder',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RefundOrderRequest
 * @return RefundOrderResponse
 */
async function refundOrder(request: RefundOrderRequest): RefundOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return refundOrderWithOptions(request, runtime);
}

model RefundPointRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20191223****'),
  lmOrderId?: string(name='LmOrderId', example='44453****'),
  reason?: string(name='Reason'),
  sellerId?: string(name='SellerId', example='10718491****'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='susan*****'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model RefundPointResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537****'),
}

model RefundPointResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RefundPointResponseBody(name='body'),
}

/**
 * @param request RefundPointRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RefundPointResponse
 */
async function refundPointWithOptions(request: RefundPointRequest, runtime: Util.RuntimeOptions): RefundPointResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.reason)) {
    query['Reason'] = request.reason;
  }
  if (!Util.isUnset(request.sellerId)) {
    query['SellerId'] = request.sellerId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RefundPoint',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RefundPointRequest
 * @return RefundPointResponse
 */
async function refundPoint(request: RefundPointRequest): RefundPointResponse {
  var runtime = new Util.RuntimeOptions{};
  return refundPointWithOptions(request, runtime);
}

model RefundUserPointRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='100'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2000***12'),
  extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='123'),
  message?: string(name='Message', example='""'),
  originRecordId?: string(name='OriginRecordId', description='This parameter is required.', example='PYPT**12'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='1'),
  title?: string(name='Title', description='This parameter is required.'),
}

model RefundUserPointShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='100'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2000***12'),
  extInfoShrink?: string(name='ExtInfo', example='{"key":"value"}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='123'),
  message?: string(name='Message', example='""'),
  originRecordId?: string(name='OriginRecordId', description='This parameter is required.', example='PYPT**12'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='1'),
  title?: string(name='Title', description='This parameter is required.'),
}

model RefundUserPointResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    accountId?: string(name='AccountId', example='180173763600****'),
    action?: string(name='Action', example='""'),
    amount?: long(name='Amount', example='1'),
    bizId?: string(name='BizId', example='LMALL20211206****'),
    bizUid?: string(name='BizUid', example='4851826221****'),
    description?: string(name='Description'),
    extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
    idempotentId?: string(name='IdempotentId', example='202112******31746-1202'),
    name?: string(name='Name'),
    recordId?: string(name='RecordId', example='414915628598****'),
    rest?: long(name='Rest', example='2000'),
    ruleId?: string(name='RuleId', example='33046'),
    status?: string(name='Status', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED****'),
}

model RefundUserPointResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RefundUserPointResponseBody(name='body'),
}

/**
 * @summary 退还用户积分
 *
 * @param tmpReq RefundUserPointRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RefundUserPointResponse
 */
async function refundUserPointWithOptions(tmpReq: RefundUserPointRequest, runtime: Util.RuntimeOptions): RefundUserPointResponse {
  Util.validateModel(tmpReq);
  var request = new RefundUserPointShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.amount)) {
    query['Amount'] = request.amount;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.idempotentId)) {
    query['IdempotentId'] = request.idempotentId;
  }
  if (!Util.isUnset(request.message)) {
    query['Message'] = request.message;
  }
  if (!Util.isUnset(request.originRecordId)) {
    query['OriginRecordId'] = request.originRecordId;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RefundUserPoint',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 退还用户积分
 *
 * @param request RefundUserPointRequest
 * @return RefundUserPointResponse
 */
async function refundUserPoint(request: RefundUserPointRequest): RefundUserPointResponse {
  var runtime = new Util.RuntimeOptions{};
  return refundUserPointWithOptions(request, runtime);
}

model RefuseMerchantSyncTaskRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20190325****'),
  sellerNick?: string(name='SellerNick'),
  taskId?: string(name='TaskId', example='1***1'),
  timeStamp?: long(name='TimeStamp', example='1641708010'),
}

model RefuseMerchantSyncTaskResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='The specified parameter lmItemId or itemId value is not valid.'),
  requestId?: string(name='RequestId', example='F2D3CA1E-28BE-5E1C-B55F-81C8F290****'),
}

model RefuseMerchantSyncTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RefuseMerchantSyncTaskResponseBody(name='body'),
}

/**
 * @param request RefuseMerchantSyncTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RefuseMerchantSyncTaskResponse
 */
async function refuseMerchantSyncTaskWithOptions(request: RefuseMerchantSyncTaskRequest, runtime: Util.RuntimeOptions): RefuseMerchantSyncTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.sellerNick)) {
    query['SellerNick'] = request.sellerNick;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.timeStamp)) {
    query['TimeStamp'] = request.timeStamp;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RefuseMerchantSyncTask',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RefuseMerchantSyncTaskRequest
 * @return RefuseMerchantSyncTaskResponse
 */
async function refuseMerchantSyncTask(request: RefuseMerchantSyncTaskRequest): RefuseMerchantSyncTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return refuseMerchantSyncTaskWithOptions(request, runtime);
}

model RegistAnonymousTbAccountRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20190729****'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='238837487****'),
}

model RegistAnonymousTbAccountResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='FC994CBE-F97C-5C58-ACF3-86F0292C****'),
}

model RegistAnonymousTbAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RegistAnonymousTbAccountResponseBody(name='body'),
}

/**
 * @param request RegistAnonymousTbAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RegistAnonymousTbAccountResponse
 */
async function registAnonymousTbAccountWithOptions(request: RegistAnonymousTbAccountRequest, runtime: Util.RuntimeOptions): RegistAnonymousTbAccountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RegistAnonymousTbAccount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RegistAnonymousTbAccountRequest
 * @return RegistAnonymousTbAccountResponse
 */
async function registAnonymousTbAccount(request: RegistAnonymousTbAccountRequest): RegistAnonymousTbAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return registAnonymousTbAccountWithOptions(request, runtime);
}

model RegisterSettleAccountRequest {
  accountChannel?: string(name='AccountChannel', example='bank'),
  accountName?: string(name='AccountName'),
  accountNo?: string(name='AccountNo', example='15******65'),
  accountPayType?: string(name='AccountPayType', example='transferIn'),
  accountType?: string(name='AccountType', example='""'),
  bizId?: string(name='BizId', example='LMALL20******007'),
  countryOrAreaCode?: string(name='CountryOrAreaCode'),
  currency?: string(name='Currency'),
  extInfo?: string(name='ExtInfo', example='{}'),
  idempotentId?: string(name='IdempotentId'),
}

model RegisterSettleAccountResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    accountId?: string(name='AccountId', example='180173763600****'),
    accountNo?: string(name='AccountNo', example='15******65'),
    id?: string(name='Id', example='252'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='26F4B2C7-931F-5AC5-8FCC-AE76C9B00D2F'),
  subCode?: string(name='SubCode', example='207'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
}

model RegisterSettleAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RegisterSettleAccountResponseBody(name='body'),
}

/**
 * @summary 注册结算账号
 *
 * @param request RegisterSettleAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RegisterSettleAccountResponse
 */
async function registerSettleAccountWithOptions(request: RegisterSettleAccountRequest, runtime: Util.RuntimeOptions): RegisterSettleAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.accountChannel)) {
    body['AccountChannel'] = request.accountChannel;
  }
  if (!Util.isUnset(request.accountName)) {
    body['AccountName'] = request.accountName;
  }
  if (!Util.isUnset(request.accountNo)) {
    body['AccountNo'] = request.accountNo;
  }
  if (!Util.isUnset(request.accountPayType)) {
    body['AccountPayType'] = request.accountPayType;
  }
  if (!Util.isUnset(request.accountType)) {
    body['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.countryOrAreaCode)) {
    body['CountryOrAreaCode'] = request.countryOrAreaCode;
  }
  if (!Util.isUnset(request.currency)) {
    body['Currency'] = request.currency;
  }
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.idempotentId)) {
    body['IdempotentId'] = request.idempotentId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RegisterSettleAccount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 注册结算账号
 *
 * @param request RegisterSettleAccountRequest
 * @return RegisterSettleAccountResponse
 */
async function registerSettleAccount(request: RegisterSettleAccountRequest): RegisterSettleAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerSettleAccountWithOptions(request, runtime);
}

model RegisterUserAccountRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2022***0001'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='3435***1231'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='user***121'),
}

model RegisterUserAccountResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='dsfdsfs***dsfdsfds'),
  message?: string(name='Message', example='success'),
  model?: {
    bizId?: string(name='BizId', example='LMALL20***002'),
    CUserId?: string(name='CUserId', example='user***121'),
    extInfo?: string(name='ExtInfo', example='{\\\\"gmtCreate\\\\":\\\\"2021-11-01 00:00:00\\\\"}'),
    lmUid?: long(name='LmUid', example='2313***1231'),
    requestId?: string(name='RequestId', example='03B94457-8***93-06CCB1345BC3'),
    tbAccountType?: string(name='TbAccountType', example='ANONY'),
    tbUserId?: long(name='TbUserId', example='3435***1231'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='03B94457-8FD***93-06CCB1345BC3'),
  subCode?: string(name='SubCode', example='1004'),
  subMessage?: string(name='SubMessage', example='""'),
  success?: boolean(name='Success', example='True'),
  totalCount?: long(name='TotalCount', example='5'),
}

model RegisterUserAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RegisterUserAccountResponseBody(name='body'),
}

/**
 * @param request RegisterUserAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RegisterUserAccountResponse
 */
async function registerUserAccountWithOptions(request: RegisterUserAccountRequest, runtime: Util.RuntimeOptions): RegisterUserAccountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RegisterUserAccount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RegisterUserAccountRequest
 * @return RegisterUserAccountResponse
 */
async function registerUserAccount(request: RegisterUserAccountRequest): RegisterUserAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerUserAccountWithOptions(request, runtime);
}

model ReleaseMovieSeatRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******005'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='221249435****'),
  extJson?: string(name='ExtJson', example='{}'),
  lockSeatApplyKey?: string(name='LockSeatApplyKey', description='This parameter is required.', example='""'),
}

model ReleaseMovieSeatResponseBody = {
  actionResult?: {
    returnCode?: string(name='ReturnCode', example='0'),
    returnMessage?: string(name='ReturnMessage', example='""'),
    returnValue?: string(name='ReturnValue', example='true'),
  }(name='ActionResult'),
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='3F43129B-020F-5F8A-88B0-9CBDE2AD6F52'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
}

model ReleaseMovieSeatResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReleaseMovieSeatResponseBody(name='body'),
}

/**
 * @param request ReleaseMovieSeatRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReleaseMovieSeatResponse
 */
async function releaseMovieSeatWithOptions(request: ReleaseMovieSeatRequest, runtime: Util.RuntimeOptions): ReleaseMovieSeatResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.lockSeatApplyKey)) {
    query['LockSeatApplyKey'] = request.lockSeatApplyKey;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReleaseMovieSeat',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ReleaseMovieSeatRequest
 * @return ReleaseMovieSeatResponse
 */
async function releaseMovieSeat(request: ReleaseMovieSeatRequest): ReleaseMovieSeatResponse {
  var runtime = new Util.RuntimeOptions{};
  return releaseMovieSeatWithOptions(request, runtime);
}

model RemoveAddressRequest {
  addressInfo?: string(name='AddressInfo', description='This parameter is required.'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL202101250001'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='1221'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model RemoveAddressResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='5E2D59BA-4EB0-45C4-A0D7-D98C1A4B320B'),
}

model RemoveAddressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveAddressResponseBody(name='body'),
}

/**
 * @param request RemoveAddressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveAddressResponse
 */
async function removeAddressWithOptions(request: RemoveAddressRequest, runtime: Util.RuntimeOptions): RemoveAddressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.addressInfo)) {
    body['AddressInfo'] = request.addressInfo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RemoveAddress',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RemoveAddressRequest
 * @return RemoveAddressResponse
 */
async function removeAddress(request: RemoveAddressRequest): RemoveAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeAddressWithOptions(request, runtime);
}

model RemoveMessagesRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2******001'),
  extJson?: string(name='ExtJson', example='{}'),
  messageIds?: string(name='MessageIds', description='This parameter is required.', example='212112212'),
}

model RemoveMessagesResponseBody = {
  actionResult?: {
    returnCode?: string(name='ReturnCode', example='0'),
    returnMessage?: string(name='ReturnMessage', example='Success'),
    returnValue?: string(name='ReturnValue', example='[{\\\\"uuid\\\\": \\\\"dim-a0bf795*******8e86d4d464dc3a\\\\", \\\\"code\\\\": \\\\"itm\\\\", \\\\"extendName\\\\": \\\\"item\\\\", \\\\"name\\\\": u\\\\"\\\\u5541\\\\", \\\\"description\\\\": u\\\\"\\\\u5546\\\\u4e49\\\\"}]'),
  }(name='ActionResult'),
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='1718921E-C8D4-55E1-B8D4-114AE537C1B7'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
}

model RemoveMessagesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveMessagesResponseBody(name='body'),
}

/**
 * @param request RemoveMessagesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveMessagesResponse
 */
async function removeMessagesWithOptions(request: RemoveMessagesRequest, runtime: Util.RuntimeOptions): RemoveMessagesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.messageIds)) {
    query['MessageIds'] = request.messageIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveMessages',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RemoveMessagesRequest
 * @return RemoveMessagesResponse
 */
async function removeMessages(request: RemoveMessagesRequest): RemoveMessagesResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeMessagesWithOptions(request, runtime);
}

model RenderH5OrderRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  bizUid?: string(name='BizUid', example='208******6520'),
  buyOrderRequestModel?: string(name='BuyOrderRequestModel'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='208******6520'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model RenderH5OrderResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    addressInfoList?: [ 
      {
        addressDetail?: string(name='AddressDetail'),
        addressId?: long(name='AddressId'),
        default?: boolean(name='Default', example='true'),
        divisionCode?: string(name='DivisionCode', example='410223'),
        receiver?: string(name='Receiver'),
        receiverPhone?: string(name='ReceiverPhone', example='158****3627'),
      }
    ](name='AddressInfoList'),
    buyerCurrentPoints?: long(name='BuyerCurrentPoints', example='1000'),
    deliveryInfoList?: [ 
      {
        displayName?: string(name='DisplayName'),
        id?: string(name='Id'),
        postFee?: long(name='PostFee'),
        serviceType?: long(name='ServiceType'),
      }
    ](name='DeliveryInfoList'),
    extInfo?: map[string]any(name='ExtInfo'),
    invoiceInfo?: {
      desc?: string(name='Desc'),
      type?: string(name='Type'),
    }(name='InvoiceInfo'),
    lmItemInfoList?: [ 
      {
        actualPrice?: long(name='ActualPrice', example='10'),
        canSell?: boolean(name='CanSell', example='true'),
        cash?: long(name='Cash'),
        features?: map[string]any(name='Features'),
        itemId?: long(name='ItemId', example='65******461'),
        itemName?: string(name='ItemName'),
        itemPicUrl?: string(name='ItemPicUrl'),
        itemUrl?: string(name='ItemUrl'),
        lmItemId?: string(name='LmItemId', example='10000102-******94679'),
        message?: string(name='Message'),
        points?: long(name='Points', example='69'),
        quantity?: int32(name='Quantity', example='1'),
        sellerId?: long(name='SellerId', example='42******044'),
        sellerNick?: string(name='SellerNick'),
        skuId?: long(name='SkuId', example='46******9302'),
        skuName?: string(name='SkuName'),
        tbShopName?: string(name='TbShopName'),
        virtualItemType?: string(name='VirtualItemType'),
      }
    ](name='LmItemInfoList'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='96B4141C-A3CD-5162-B435-4780A75E3D97'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='5'),
}

model RenderH5OrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RenderH5OrderResponseBody(name='body'),
}

/**
 * @param request RenderH5OrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RenderH5OrderResponse
 */
async function renderH5OrderWithOptions(request: RenderH5OrderRequest, runtime: Util.RuntimeOptions): RenderH5OrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.buyOrderRequestModel)) {
    query['BuyOrderRequestModel'] = request.buyOrderRequestModel;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RenderH5Order',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RenderH5OrderRequest
 * @return RenderH5OrderResponse
 */
async function renderH5Order(request: RenderH5OrderRequest): RenderH5OrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return renderH5OrderWithOptions(request, runtime);
}

model RenderOrderRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL2000***12'),
  bizUid?: string(name='BizUid', example='2212850685759'),
  deliveryAddress?: string(name='DeliveryAddress', example='***********************************************************************'),
  extJson?: string(name='ExtJson', example='{}'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='620033847326'),
      lmItemId?: string(name='LmItemId', example='10016572-654408058233'),
      quantity?: int32(name='Quantity', example='1'),
      skuId?: long(name='SkuId', example='4415814743135'),
    }
  ](name='ItemList'),
  lmItemId?: string(name='LmItemId', example='10016572-654408058233'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='2212850685759'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model RenderOrderResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SKU_IS_MISSING'),
  model?: {
    renderOrderInfos?: {
      renderOrderInfos?: [ 
      {
        deliveryInfos?: {
          deliveryInfos?: [ 
          {
            displayName?: string(name='DisplayName'),
            id?: string(name='Id'),
            postFee?: long(name='PostFee'),
            serviceType?: long(name='ServiceType'),
          }
        ](name='DeliveryInfos')
        }(name='DeliveryInfos'),
        extInfo?: map[string]any(name='ExtInfo'),
        lmItemInfos?: {
          lmItemInfos?: [ 
          {
            actualPrice?: long(name='ActualPrice'),
            canSell?: boolean(name='CanSell'),
            cash?: long(name='Cash'),
            itemId?: long(name='ItemId', example='658057729548'),
            itemName?: string(name='ItemName', example='iphone12'),
            itemPicUrl?: string(name='ItemPicUrl'),
            lmItemId?: string(name='LmItemId', example='10001036-254415474010492928'),
            message?: string(name='Message'),
            points?: long(name='Points', example='39'),
            quantity?: int32(name='Quantity', example='1'),
            sellerId?: long(name='SellerId', example='107184918'),
            sellerNick?: string(name='SellerNick'),
            skuId?: long(name='SkuId', example='4931861303981'),
            skuName?: string(name='SkuName', example='liu_12'),
          }
        ](name='LmItemInfos')
        }(name='LmItemInfos'),
      }
    ](name='RenderOrderInfos')
    }(name='RenderOrderInfos'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='DAAA6391-3339-5333-9E4D-C71CD26A231F'),
  subCode?: string(name='SubCode', example='SUCCESS'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='False'),
  totalCount?: long(name='TotalCount', example='5'),
}

model RenderOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RenderOrderResponseBody(name='body'),
}

/**
 * @param request RenderOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RenderOrderResponse
 */
async function renderOrderWithOptions(request: RenderOrderRequest, runtime: Util.RuntimeOptions): RenderOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.deliveryAddress)) {
    query['DeliveryAddress'] = request.deliveryAddress;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.itemList)) {
    query['ItemList'] = request.itemList;
  }
  if (!Util.isUnset(request.lmItemId)) {
    query['LmItemId'] = request.lmItemId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RenderOrder',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RenderOrderRequest
 * @return RenderOrderResponse
 */
async function renderOrder(request: RenderOrderRequest): RenderOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return renderOrderWithOptions(request, runtime);
}

model RenderOrderWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL202***001'),
  deliveryAddress?: string(name='DeliveryAddress', description='This parameter is required.'),
  itemList?: [ 
    {
      itemId?: long(name='ItemId', example='661***740'),
      lmItemId?: string(name='LmItemId', example='100***02-661***740'),
      quantity?: int32(name='Quantity', example='1'),
      skuId?: long(name='SkuId', example='458***257'),
    }
  ](name='ItemList', description='This parameter is required.'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='123***23'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='U123***23'),
}

model RenderOrderWithDesignatedTbUidShrinkRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL202***001'),
  deliveryAddress?: string(name='DeliveryAddress', description='This parameter is required.'),
  itemListShrink?: string(name='ItemList', description='This parameter is required.'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='123***23'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='U123***23'),
}

model RenderOrderWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    addressInfos?: [ 
      {
        addressDetail?: string(name='AddressDetail'),
        addressId?: long(name='AddressId', example='31***40'),
        divisionCode?: string(name='DivisionCode', example='43***03'),
        isDefault?: boolean(name='IsDefault', example='false'),
        receiver?: string(name='Receiver'),
        receiverPhone?: string(name='ReceiverPhone', example='137***343'),
        townDivisionCode?: string(name='TownDivisionCode', example='430***008'),
      }
    ](name='AddressInfos'),
    buyerCurrentPoints?: long(name='BuyerCurrentPoints', example='1000'),
    canSell?: boolean(name='CanSell', example='true'),
    extInfo?: map[string]string(name='ExtInfo'),
    message?: string(name='Message', example='SUCCESS'),
    renderOrderInfos?: [ 
      {
        canSell?: boolean(name='CanSell', example='true'),
        deliveryInfos?: [ 
          {
            displayName?: string(name='DisplayName'),
            id?: string(name='Id', description='id', example='10'),
            postFee?: long(name='PostFee', example='0'),
            serviceType?: long(name='ServiceType', example='-4'),
          }
        ](name='DeliveryInfos'),
        extInfo?: map[string]string(name='ExtInfo'),
        invoiceInfo?: {
          desc?: string(name='Desc', example='""'),
          type?: string(name='Type'),
        }(name='InvoiceInfo'),
        lmItemInfos?: [ 
          {
            actualPrice?: long(name='ActualPrice', example='50000'),
            canSell?: boolean(name='CanSell', example='true'),
            cash?: long(name='Cash', example='16000'),
            features?: map[string]string(name='Features'),
            itemId?: long(name='ItemId', example='661***740'),
            itemName?: string(name='ItemName', example='iphone12'),
            itemPicUrl?: string(name='ItemPicUrl', example='https://aliyundoc.com'),
            itemPromInstVOS?: [ 
              {
                availableItems?: [ 
                  {
                    itemId?: long(name='ItemId', example='668***630'),
                    lmItemId?: string(name='LmItemId', example='100***35-630***809'),
                    lmShopId?: long(name='LmShopId', example='100***35'),
                    number?: int32(name='Number', example='1'),
                    points?: long(name='Points', example='0'),
                    pointsAmount?: long(name='PointsAmount', example='0'),
                    priceCent?: long(name='PriceCent', example='100'),
                    removed?: boolean(name='Removed', example='false'),
                    skuId?: long(name='SkuId', description='skuid', example='457***764'),
                    tbSellerId?: long(name='TbSellerId', example='32***42'),
                    userPayFee?: long(name='UserPayFee', example='100'),
                  }
                ](name='AvailableItems'),
                canUse?: boolean(name='CanUse', example='false'),
                discountPrice?: long(name='DiscountPrice', example='0'),
                expireTime?: long(name='ExpireTime', example='1659612158'),
                instanceId?: string(name='InstanceId', example='324***234'),
                level?: string(name='Level', example='0'),
                lmItemId?: string(name='LmItemId', example='100***35-582***661'),
                promotionName?: string(name='PromotionName'),
                promotionType?: string(name='PromotionType'),
                reason?: string(name='Reason'),
                selected?: boolean(name='Selected', example='false'),
                skuIds?: [ long ](name='SkuIds'),
                specialPrice?: long(name='SpecialPrice', example='0'),
                subBizCode?: string(name='SubBizCode', example='0eae4fd***e23145'),
                tbSellerId?: long(name='TbSellerId', example='32***24'),
                thresholdPrice?: long(name='ThresholdPrice', example='0'),
                useStartTime?: long(name='UseStartTime', example='1659612158'),
              }
            ](name='ItemPromInstVOS'),
            itemUrl?: string(name='ItemUrl', example='https://aliyundoc.com'),
            lmItemId?: string(name='LmItemId', example='100***02-661***740'),
            message?: string(name='Message', example='SUCCESS'),
            pointPrice?: long(name='PointPrice', example='1000000'),
            points?: long(name='Points', example='100000'),
            promotionFee?: long(name='PromotionFee', example='6000'),
            quantity?: int32(name='Quantity', example='1'),
            reservePrice?: long(name='ReservePrice', example='1000'),
            sellerId?: long(name='SellerId', example='107***918'),
            sellerNick?: string(name='SellerNick'),
            skuId?: long(name='SkuId', description='skuid', example='493***981'),
            skuName?: string(name='SkuName', example='64GB'),
            tbShopName?: string(name='TbShopName'),
            virtualItemType?: string(name='VirtualItemType', example='""'),
          }
        ](name='LmItemInfos'),
        message?: string(name='Message', example='""'),
        sellerId?: long(name='SellerId', example='218***608'),
        shopPromInstVOS?: [ 
          {
            availableItems?: [ 
              {
                itemId?: long(name='ItemId', example='668***630'),
                lmItemId?: string(name='LmItemId', example='100***88-52***337'),
                lmShopId?: long(name='LmShopId', example='10***40'),
                number?: int32(name='Number', example='0'),
                points?: long(name='Points', example='0'),
                pointsAmount?: long(name='PointsAmount', example='0'),
                priceCent?: long(name='PriceCent', example='1490'),
                removed?: boolean(name='Removed', example='false'),
                skuId?: long(name='SkuId', example='502***91'),
                tbSellerId?: long(name='TbSellerId', example='32***32'),
                userPayFee?: long(name='UserPayFee', example='100'),
              }
            ](name='AvailableItems'),
            canUse?: boolean(name='CanUse', example='false'),
            discountPrice?: long(name='DiscountPrice', example='3'),
            expireTime?: long(name='ExpireTime', example='1659612158'),
            instanceId?: string(name='InstanceId', example='324***242'),
            level?: string(name='Level', example='0'),
            lmItemId?: string(name='LmItemId', example='100***42-568***99'),
            promotionName?: string(name='PromotionName'),
            promotionType?: string(name='PromotionType'),
            reason?: string(name='Reason', example='""'),
            selected?: boolean(name='Selected', example='true'),
            skuIds?: [ long ](name='SkuIds'),
            specialPrice?: long(name='SpecialPrice', example='88'),
            subBizCode?: string(name='SubBizCode', example='40b8362***20760d'),
            tbSellerId?: long(name='TbSellerId', example='343***242'),
            thresholdPrice?: long(name='ThresholdPrice', example='1000'),
            useStartTime?: long(name='UseStartTime', example='1659612158'),
          }
        ](name='ShopPromInstVOS'),
        tbShopName?: string(name='TbShopName'),
      }
    ](name='RenderOrderInfos'),
    unsellableRenderOrderInfos?: [ 
      {
        canSell?: boolean(name='CanSell', example='false'),
        deliveryInfos?: [ 
          {
            displayName?: string(name='DisplayName'),
            id?: string(name='Id', description='id', example='4'),
            postFee?: long(name='PostFee', example='0'),
            serviceType?: long(name='ServiceType', example='-4'),
          }
        ](name='DeliveryInfos'),
        extInfo?: map[string]string(name='ExtInfo'),
        invoiceInfo?: {
          desc?: string(name='Desc'),
          type?: string(name='Type'),
        }(name='InvoiceInfo'),
        lmItemInfos?: [ 
          {
            actualPrice?: long(name='ActualPrice', example='1000'),
            canSell?: boolean(name='CanSell', example='true'),
            cash?: long(name='Cash', example='100'),
            features?: map[string]string(name='Features'),
            itemId?: long(name='ItemId', example='651***245'),
            itemName?: string(name='ItemName'),
            itemPicUrl?: string(name='ItemPicUrl', example='https://aliyundoc.com'),
            itemPromInstVOS?: [ 
              {
                availableItems?: [ 
                  {
                    itemId?: long(name='ItemId', example='413***546'),
                    lmItemId?: string(name='LmItemId', example='100***03-680***926'),
                    lmShopId?: long(name='LmShopId', example='100***92'),
                    number?: int32(name='Number', example='1'),
                    points?: long(name='Points', example='0'),
                    pointsAmount?: long(name='PointsAmount', example='0'),
                    priceCent?: long(name='PriceCent', example='2950'),
                    removed?: boolean(name='Removed', example='false'),
                    skuId?: long(name='SkuId', description='skuid', example='504***414'),
                    tbSellerId?: long(name='TbSellerId', example='21***31'),
                    userPayFee?: long(name='UserPayFee', example='2950'),
                  }
                ](name='AvailableItems'),
                canUse?: boolean(name='CanUse', example='false'),
                discountPrice?: long(name='DiscountPrice', example='600'),
                expireTime?: long(name='ExpireTime', example='1659612158'),
                instanceId?: string(name='InstanceId', example='324***253'),
                level?: string(name='Level', example='1'),
                lmItemId?: string(name='LmItemId', example='100***17-6511***700'),
                promotionName?: string(name='PromotionName'),
                promotionType?: string(name='PromotionType'),
                reason?: string(name='Reason', example='""'),
                selected?: boolean(name='Selected', example='false'),
                skuIds?: [ long ](name='SkuIds', description='skuid'),
                specialPrice?: long(name='SpecialPrice', example='300'),
                subBizCode?: string(name='SubBizCode', example='9b1f9bd***b774c0'),
                tbSellerId?: long(name='TbSellerId', example='324***242'),
                thresholdPrice?: long(name='ThresholdPrice', example='500'),
                useStartTime?: long(name='UseStartTime', example='1659612158'),
              }
            ](name='ItemPromInstVOS'),
            itemUrl?: string(name='ItemUrl', example='https://aliyundoc.com'),
            lmItemId?: string(name='LmItemId', example='100***87-644***2078'),
            message?: string(name='Message', example='""'),
            pointPrice?: long(name='PointPrice', example='0'),
            points?: long(name='Points', example='0'),
            promotionFee?: long(name='PromotionFee', example='0'),
            quantity?: int32(name='Quantity', example='3'),
            reservePrice?: long(name='ReservePrice', example='999'),
            sellerId?: long(name='SellerId', example='218***608'),
            sellerNick?: string(name='SellerNick'),
            skuId?: long(name='SkuId', description='skuid', example='-1'),
            skuName?: string(name='SkuName', example='500g'),
            tbShopName?: string(name='TbShopName'),
            virtualItemType?: string(name='VirtualItemType'),
          }
        ](name='LmItemInfos'),
        message?: string(name='Message'),
        sellerId?: long(name='SellerId', example='2204***416'),
        shopPromInstVOS?: [ 
          {
            availableItems?: [ 
              {
                itemId?: long(name='ItemId', example='661***792'),
                lmItemId?: string(name='LmItemId', example='100***66-633***108'),
                lmShopId?: long(name='LmShopId', example='100***92'),
                number?: int32(name='Number', example='1'),
                points?: long(name='Points', example='0'),
                pointsAmount?: long(name='PointsAmount', example='0'),
                priceCent?: long(name='PriceCent', example='1000'),
                removed?: boolean(name='Removed', example='true'),
                skuId?: long(name='SkuId', example='502***2291'),
                tbSellerId?: long(name='TbSellerId', example='3432***42'),
                userPayFee?: long(name='UserPayFee', example='500'),
              }
            ](name='AvailableItems'),
            canUse?: boolean(name='CanUse', example='false'),
            discountPrice?: long(name='DiscountPrice', example='0'),
            expireTime?: long(name='ExpireTime', example='1659612158'),
            instanceId?: string(name='InstanceId', example='232***777'),
            level?: string(name='Level', example='1'),
            lmItemId?: string(name='LmItemId', example='100***95-625***772'),
            promotionName?: string(name='PromotionName'),
            promotionType?: string(name='PromotionType'),
            reason?: string(name='Reason', example='""'),
            selected?: boolean(name='Selected', example='false'),
            skuIds?: [ long ](name='SkuIds'),
            specialPrice?: long(name='SpecialPrice', example='0'),
            subBizCode?: string(name='SubBizCode', example='fa7a31***7787b2'),
            tbSellerId?: long(name='TbSellerId', example='44***53'),
            thresholdPrice?: long(name='ThresholdPrice', example='0'),
            useStartTime?: long(name='UseStartTime', example='1659612158'),
          }
        ](name='ShopPromInstVOS'),
        tbShopName?: string(name='TbShopName'),
      }
    ](name='UnsellableRenderOrderInfos'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='978A8742-1A***9-F8713ACBC385'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='1'),
}

model RenderOrderWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RenderOrderWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param tmpReq RenderOrderWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RenderOrderWithDesignatedTbUidResponse
 */
async function renderOrderWithDesignatedTbUidWithOptions(tmpReq: RenderOrderWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): RenderOrderWithDesignatedTbUidResponse {
  Util.validateModel(tmpReq);
  var request = new RenderOrderWithDesignatedTbUidShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.itemList)) {
    request.itemListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.itemList, 'ItemList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.deliveryAddress)) {
    body['DeliveryAddress'] = request.deliveryAddress;
  }
  if (!Util.isUnset(request.itemListShrink)) {
    body['ItemList'] = request.itemListShrink;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RenderOrderWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RenderOrderWithDesignatedTbUidRequest
 * @return RenderOrderWithDesignatedTbUidResponse
 */
async function renderOrderWithDesignatedTbUid(request: RenderOrderWithDesignatedTbUidRequest): RenderOrderWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return renderOrderWithDesignatedTbUidWithOptions(request, runtime);
}

model RepayForPayUrlRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210802****'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='9f99f38030254728***'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.', example='449975059**'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='9f99f38030254728***'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model RepayForPayUrlResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='The specified parameter %s value is not valid.'),
  model?: {
    frontUrl?: string(name='FrontUrl', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='1AF23E47-D8FB-576A-B069-CA98B4DE****'),
}

model RepayForPayUrlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RepayForPayUrlResponseBody(name='body'),
}

/**
 * @param request RepayForPayUrlRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RepayForPayUrlResponse
 */
async function repayForPayUrlWithOptions(request: RepayForPayUrlRequest, runtime: Util.RuntimeOptions): RepayForPayUrlResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RepayForPayUrl',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RepayForPayUrlRequest
 * @return RepayForPayUrlResponse
 */
async function repayForPayUrl(request: RepayForPayUrlRequest): RepayForPayUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return repayForPayUrlWithOptions(request, runtime);
}

model RepayOrderRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20210125****'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='9f99f38030254728***'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.', example='449975059**'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', example='9f99f38030254728***'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model RepayOrderResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='The specified parameter %s value is not valid.'),
  requestId?: string(name='RequestId', example='322830A9-C820-5974-B409-7B32C41E8B42'),
}

model RepayOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RepayOrderResponseBody(name='body'),
}

/**
 * @param request RepayOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RepayOrderResponse
 */
async function repayOrderWithOptions(request: RepayOrderRequest, runtime: Util.RuntimeOptions): RepayOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    query['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RepayOrder',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RepayOrderRequest
 * @return RepayOrderResponse
 */
async function repayOrder(request: RepayOrderRequest): RepayOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return repayOrderWithOptions(request, runtime);
}

model RepayWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.'),
  extJson?: string(name='ExtJson'),
  lmOrderId?: long(name='LmOrderId', description='This parameter is required.'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.'),
  tbUserId?: long(name='TbUserId'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.'),
}

model RepayWithDesignatedTbUidResponseBody = {
  code?: string(name='Code'),
  logsId?: string(name='LogsId'),
  message?: string(name='Message'),
  model?: {
    app?: string(name='App'),
    frontUrl?: string(name='FrontUrl'),
    isOnlyPaidPoint?: boolean(name='IsOnlyPaidPoint'),
  }(name='Model'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  subCode?: string(name='SubCode'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success'),
  totalCount?: long(name='TotalCount'),
}

model RepayWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RepayWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request RepayWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RepayWithDesignatedTbUidResponse
 */
async function repayWithDesignatedTbUidWithOptions(request: RepayWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): RepayWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.extJson)) {
    body['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.lmOrderId)) {
    body['LmOrderId'] = request.lmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RepayWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request RepayWithDesignatedTbUidRequest
 * @return RepayWithDesignatedTbUidResponse
 */
async function repayWithDesignatedTbUid(request: RepayWithDesignatedTbUidRequest): RepayWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return repayWithDesignatedTbUidWithOptions(request, runtime);
}

model ReserveMovieSeatRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******003'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='22******85759'),
  extJson?: string(name='ExtJson', example='{}'),
  mobile?: string(name='Mobile', description='This parameter is required.', example='186******71'),
  scheduleId?: long(name='ScheduleId', description='This parameter is required.', example='9******15'),
  seatIds?: string(name='SeatIds', description='This parameter is required.'),
  seatNames?: string(name='SeatNames', description='This parameter is required.'),
}

model ReserveMovieSeatResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='5E2D59BA-4EB0-45C4-A0D7-D98C1A4B320B'),
  reservedSeat?: {
    applyKey?: string(name='ApplyKey', example='""'),
    defaultLockSecond?: long(name='DefaultLockSecond', example='900'),
    reservedTime?: long(name='ReservedTime', example='1649302236658'),
    status?: string(name='Status', example='LOCKSUCCESS'),
  }(name='ReservedSeat'),
  subCode?: string(name='SubCode', example='207'),
  subMessage?: string(name='SubMessage'),
  success?: boolean(name='Success', example='true'),
}

model ReserveMovieSeatResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReserveMovieSeatResponseBody(name='body'),
}

/**
 * @param request ReserveMovieSeatRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReserveMovieSeatResponse
 */
async function reserveMovieSeatWithOptions(request: ReserveMovieSeatRequest, runtime: Util.RuntimeOptions): ReserveMovieSeatResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.mobile)) {
    query['Mobile'] = request.mobile;
  }
  if (!Util.isUnset(request.scheduleId)) {
    query['ScheduleId'] = request.scheduleId;
  }
  if (!Util.isUnset(request.seatIds)) {
    query['SeatIds'] = request.seatIds;
  }
  if (!Util.isUnset(request.seatNames)) {
    query['SeatNames'] = request.seatNames;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReserveMovieSeat',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ReserveMovieSeatRequest
 * @return ReserveMovieSeatResponse
 */
async function reserveMovieSeat(request: ReserveMovieSeatRequest): ReserveMovieSeatResponse {
  var runtime = new Util.RuntimeOptions{};
  return reserveMovieSeatWithOptions(request, runtime);
}

model SettleOrderRequest {
  extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
  merchantId?: string(name='MerchantId', example='64******721'),
  outRequestNo?: string(name='OutRequestNo', example='""'),
  outTradeNo?: string(name='OutTradeNo', example='""'),
  royaltyParameters?: string(name='RoyaltyParameters', example='""'),
  tradeNo?: string(name='TradeNo', example='""'),
}

model SettleOrderResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
  tradeOrderSettleResponse?: {
    outRequestNo?: string(name='OutRequestNo', example='""'),
    tradeNo?: string(name='TradeNo', example='""'),
  }(name='TradeOrderSettleResponse'),
}

model SettleOrderResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SettleOrderResponseBody(name='body'),
}

/**
 * @param request SettleOrderRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SettleOrderResponse
 */
async function settleOrderWithOptions(request: SettleOrderRequest, runtime: Util.RuntimeOptions): SettleOrderResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfo)) {
    body['ExtInfo'] = request.extInfo;
  }
  if (!Util.isUnset(request.merchantId)) {
    body['MerchantId'] = request.merchantId;
  }
  if (!Util.isUnset(request.outRequestNo)) {
    body['OutRequestNo'] = request.outRequestNo;
  }
  if (!Util.isUnset(request.outTradeNo)) {
    body['OutTradeNo'] = request.outTradeNo;
  }
  if (!Util.isUnset(request.royaltyParameters)) {
    body['RoyaltyParameters'] = request.royaltyParameters;
  }
  if (!Util.isUnset(request.tradeNo)) {
    body['TradeNo'] = request.tradeNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SettleOrder',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SettleOrderRequest
 * @return SettleOrderResponse
 */
async function settleOrder(request: SettleOrderRequest): SettleOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return settleOrderWithOptions(request, runtime);
}

model StartUserGameRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  activityId?: string(name='ActivityId', description='This parameter is required.', example='671091829240653825'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20288*****003'),
  extInfo?: map[string]any(name='ExtInfo', example='{\\\\"channelId\\\\":\\\\"test\\\\"}'),
  gameId?: string(name='GameId', description='This parameter is required.', example='673474835708274689'),
  routeId?: string(name='RouteId', example='RouteId1'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='123'),
  userApp?: string(name='UserApp', example='MAC'),
}

model StartUserGameShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  activityId?: string(name='ActivityId', description='This parameter is required.', example='671091829240653825'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20288*****003'),
  extInfoShrink?: string(name='ExtInfo', example='{\\\\"channelId\\\\":\\\\"test\\\\"}'),
  gameId?: string(name='GameId', description='This parameter is required.', example='673474835708274689'),
  routeId?: string(name='RouteId', example='RouteId1'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='123'),
  userApp?: string(name='UserApp', example='MAC'),
}

model StartUserGameResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    activityId?: string(name='ActivityId'),
    bizId?: string(name='BizId'),
    currentShowContent?: string(name='CurrentShowContent'),
    currentStepId?: string(name='CurrentStepId'),
    currentStepStatus?: string(name='CurrentStepStatus'),
    desc?: string(name='Desc'),
    extInfo?: string(name='ExtInfo'),
    gameId?: string(name='GameId'),
    name?: string(name='Name'),
    processId?: string(name='ProcessId', example='1916'),
    routeId?: string(name='RouteId'),
    status?: string(name='Status'),
    type?: string(name='Type'),
  }(name='Model'),
  requestId?: string(name='RequestId', description='Id of the request', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
}

model StartUserGameResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartUserGameResponseBody(name='body'),
}

/**
 * @summary 用户开始游戏（活动玩法）
 *
 * @param tmpReq StartUserGameRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartUserGameResponse
 */
async function startUserGameWithOptions(tmpReq: StartUserGameRequest, runtime: Util.RuntimeOptions): StartUserGameResponse {
  Util.validateModel(tmpReq);
  var request = new StartUserGameShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.activityId)) {
    query['ActivityId'] = request.activityId;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.gameId)) {
    query['GameId'] = request.gameId;
  }
  if (!Util.isUnset(request.routeId)) {
    query['RouteId'] = request.routeId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.userApp)) {
    query['UserApp'] = request.userApp;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StartUserGame',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 用户开始游戏（活动玩法）
 *
 * @param request StartUserGameRequest
 * @return StartUserGameResponse
 */
async function startUserGame(request: StartUserGameRequest): StartUserGameResponse {
  var runtime = new Util.RuntimeOptions{};
  return startUserGameWithOptions(request, runtime);
}

model SubmitReturnGoodLogisticsRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20****80001'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='250014030308185405'),
  cpCode?: string(name='CpCode', description='This parameter is required.', example='SF'),
  disputeId?: long(name='DisputeId', description='This parameter is required.', example='96281042016947370'),
  logisticsNo?: string(name='LogisticsNo', description='This parameter is required.', example='SF131*****7061'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='368925182'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='true'),
}

model SubmitReturnGoodLogisticsResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='C27A9456-5FC3-529D-9FDF-B21323E93B63'),
}

model SubmitReturnGoodLogisticsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitReturnGoodLogisticsResponseBody(name='body'),
}

/**
 * @param request SubmitReturnGoodLogisticsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SubmitReturnGoodLogisticsResponse
 */
async function submitReturnGoodLogisticsWithOptions(request: SubmitReturnGoodLogisticsRequest, runtime: Util.RuntimeOptions): SubmitReturnGoodLogisticsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.cpCode)) {
    query['CpCode'] = request.cpCode;
  }
  if (!Util.isUnset(request.disputeId)) {
    query['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.logisticsNo)) {
    query['LogisticsNo'] = request.logisticsNo;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    query['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SubmitReturnGoodLogistics',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SubmitReturnGoodLogisticsRequest
 * @return SubmitReturnGoodLogisticsResponse
 */
async function submitReturnGoodLogistics(request: SubmitReturnGoodLogisticsRequest): SubmitReturnGoodLogisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitReturnGoodLogisticsWithOptions(request, runtime);
}

model SubmitReturnGoodLogisticsWithDesignatedTbUidRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20***003'),
  cpCode?: string(name='CpCode', description='This parameter is required.', example='YTO'),
  disputeId?: long(name='DisputeId', description='This parameter is required.', example='19145***4240'),
  logisticsNo?: string(name='LogisticsNo', description='This parameter is required.', example='YT685***0586'),
  subLmOrderId?: string(name='SubLmOrderId', description='This parameter is required.', example='702***47'),
  tbAccountType?: string(name='TbAccountType', description='This parameter is required.', example='ANONY'),
  tbUserId?: long(name='TbUserId', example='321**123'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='user0***01'),
}

model SubmitReturnGoodLogisticsWithDesignatedTbUidResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId', example='1'),
  message?: string(name='Message', example='SUCCESS'),
  model?: any(name='Model', example='null'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', description='pageSize', example='20'),
  requestId?: string(name='RequestId', example='49789122-E***2-CFE09154810D'),
  subCode?: string(name='SubCode', example='200'),
  subMessage?: string(name='SubMessage', example='SUCCESS'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='19'),
}

model SubmitReturnGoodLogisticsWithDesignatedTbUidResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SubmitReturnGoodLogisticsWithDesignatedTbUidResponseBody(name='body'),
}

/**
 * @param request SubmitReturnGoodLogisticsWithDesignatedTbUidRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SubmitReturnGoodLogisticsWithDesignatedTbUidResponse
 */
async function submitReturnGoodLogisticsWithDesignatedTbUidWithOptions(request: SubmitReturnGoodLogisticsWithDesignatedTbUidRequest, runtime: Util.RuntimeOptions): SubmitReturnGoodLogisticsWithDesignatedTbUidResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.cpCode)) {
    body['CpCode'] = request.cpCode;
  }
  if (!Util.isUnset(request.disputeId)) {
    body['DisputeId'] = request.disputeId;
  }
  if (!Util.isUnset(request.logisticsNo)) {
    body['LogisticsNo'] = request.logisticsNo;
  }
  if (!Util.isUnset(request.subLmOrderId)) {
    body['SubLmOrderId'] = request.subLmOrderId;
  }
  if (!Util.isUnset(request.tbAccountType)) {
    body['TbAccountType'] = request.tbAccountType;
  }
  if (!Util.isUnset(request.tbUserId)) {
    body['TbUserId'] = request.tbUserId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    body['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SubmitReturnGoodLogisticsWithDesignatedTbUid',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SubmitReturnGoodLogisticsWithDesignatedTbUidRequest
 * @return SubmitReturnGoodLogisticsWithDesignatedTbUidResponse
 */
async function submitReturnGoodLogisticsWithDesignatedTbUid(request: SubmitReturnGoodLogisticsWithDesignatedTbUidRequest): SubmitReturnGoodLogisticsWithDesignatedTbUidResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitReturnGoodLogisticsWithDesignatedTbUidWithOptions(request, runtime);
}

model SyncMerchantInfoRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******002'),
  itemList?: string(name='ItemList'),
  sellerNick?: string(name='SellerNick'),
  taskId?: string(name='TaskId', example='1****3'),
  timeStamp?: long(name='TimeStamp', example='1639540484044'),
}

model SyncMerchantInfoResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    status?: string(name='Status'),
    taskId?: string(name='TaskId', example='1****1'),
    url?: string(name='Url'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='79C01D47-3C44-57D9-BC99-1B33F7ED14B8'),
}

model SyncMerchantInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SyncMerchantInfoResponseBody(name='body'),
}

/**
 * @param request SyncMerchantInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SyncMerchantInfoResponse
 */
async function syncMerchantInfoWithOptions(request: SyncMerchantInfoRequest, runtime: Util.RuntimeOptions): SyncMerchantInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.sellerNick)) {
    query['SellerNick'] = request.sellerNick;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!Util.isUnset(request.timeStamp)) {
    query['TimeStamp'] = request.timeStamp;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemList)) {
    body['ItemList'] = request.itemList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SyncMerchantInfo',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request SyncMerchantInfoRequest
 * @return SyncMerchantInfoResponse
 */
async function syncMerchantInfo(request: SyncMerchantInfoRequest): SyncMerchantInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return syncMerchantInfoWithOptions(request, runtime);
}

model UnFreezeUserPointRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='1000'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******05'),
  extInfo?: map[string]any(name='ExtInfo', example='{}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='20211212******31746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******37'),
  title?: string(name='Title', description='This parameter is required.'),
}

model UnFreezeUserPointShrinkRequest {
  accountType?: string(name='AccountType', example='ANONY'),
  amount?: long(name='Amount', description='This parameter is required.', example='1000'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******05'),
  extInfoShrink?: string(name='ExtInfo', example='{}'),
  idempotentId?: string(name='IdempotentId', description='This parameter is required.', example='20211212******31746-1202'),
  message?: string(name='Message'),
  ruleId?: string(name='RuleId', description='This parameter is required.', example='136'),
  thirdPartyUserId?: string(name='ThirdPartyUserId', description='This parameter is required.', example='22******37'),
  title?: string(name='Title', description='This parameter is required.'),
}

model UnFreezeUserPointResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    accountId?: string(name='AccountId', example='17******31'),
    action?: string(name='Action', example='""'),
    amount?: long(name='Amount', example='1000'),
    bizId?: string(name='BizId', example='LMALL20******001'),
    bizUid?: string(name='BizUid', example='22******37'),
    description?: string(name='Description'),
    extInfo?: map[string]any(name='ExtInfo', example='{"key":"value"}'),
    idempotentId?: string(name='IdempotentId', example='20211212******31746-1202'),
    name?: string(name='Name'),
    recordId?: string(name='RecordId', example='""'),
    rest?: long(name='Rest', example='2000'),
    ruleId?: string(name='RuleId', example='136'),
    status?: string(name='Status', example='""'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D08E8'),
}

model UnFreezeUserPointResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnFreezeUserPointResponseBody(name='body'),
}

/**
 * @summary 解冻用户积分
 *
 * @param tmpReq UnFreezeUserPointRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnFreezeUserPointResponse
 */
async function unFreezeUserPointWithOptions(tmpReq: UnFreezeUserPointRequest, runtime: Util.RuntimeOptions): UnFreezeUserPointResponse {
  Util.validateModel(tmpReq);
  var request = new UnFreezeUserPointShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.accountType)) {
    query['AccountType'] = request.accountType;
  }
  if (!Util.isUnset(request.amount)) {
    query['Amount'] = request.amount;
  }
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.idempotentId)) {
    query['IdempotentId'] = request.idempotentId;
  }
  if (!Util.isUnset(request.message)) {
    query['Message'] = request.message;
  }
  if (!Util.isUnset(request.ruleId)) {
    query['RuleId'] = request.ruleId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnFreezeUserPoint',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 解冻用户积分
 *
 * @param request UnFreezeUserPointRequest
 * @return UnFreezeUserPointResponse
 */
async function unFreezeUserPoint(request: UnFreezeUserPointRequest): UnFreezeUserPointResponse {
  var runtime = new Util.RuntimeOptions{};
  return unFreezeUserPointWithOptions(request, runtime);
}

model UnsignWithholdAgreementRequest {
  agreementNo?: string(name='AgreementNo', example='20******8006'),
  externalAgreementNo?: string(name='ExternalAgreementNo', example='234******3626'),
  merchantId?: string(name='MerchantId', example='64******721'),
  outRequestNo?: string(name='OutRequestNo', example='""'),
}

model UnsignWithholdAgreementResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D08E8'),
  withholdSignResponse?: {
    outRequestNo?: string(name='OutRequestNo', example='""'),
  }(name='WithholdSignResponse'),
}

model UnsignWithholdAgreementResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnsignWithholdAgreementResponseBody(name='body'),
}

/**
 * @param request UnsignWithholdAgreementRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnsignWithholdAgreementResponse
 */
async function unsignWithholdAgreementWithOptions(request: UnsignWithholdAgreementRequest, runtime: Util.RuntimeOptions): UnsignWithholdAgreementResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.agreementNo)) {
    body['AgreementNo'] = request.agreementNo;
  }
  if (!Util.isUnset(request.externalAgreementNo)) {
    body['ExternalAgreementNo'] = request.externalAgreementNo;
  }
  if (!Util.isUnset(request.merchantId)) {
    body['MerchantId'] = request.merchantId;
  }
  if (!Util.isUnset(request.outRequestNo)) {
    body['OutRequestNo'] = request.outRequestNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnsignWithholdAgreement',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UnsignWithholdAgreementRequest
 * @return UnsignWithholdAgreementResponse
 */
async function unsignWithholdAgreement(request: UnsignWithholdAgreementRequest): UnsignWithholdAgreementResponse {
  var runtime = new Util.RuntimeOptions{};
  return unsignWithholdAgreementWithOptions(request, runtime);
}

model UpdateAddressRequest {
  addressInfo?: string(name='AddressInfo', description='This parameter is required.'),
  bizId?: string(name='BizId', description='This parameter is required.', example='LMMINIAPP202004140002'),
  thirdPartyUserId?: string(name='ThirdPartyUserId'),
  useAnonymousTbAccount?: boolean(name='UseAnonymousTbAccount', example='false'),
}

model UpdateAddressResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='6103AD7B-21C2-523B-89D0-579DA58D08E8'),
}

model UpdateAddressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAddressResponseBody(name='body'),
}

/**
 * @param request UpdateAddressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAddressResponse
 */
async function updateAddressWithOptions(request: UpdateAddressRequest, runtime: Util.RuntimeOptions): UpdateAddressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.thirdPartyUserId)) {
    query['ThirdPartyUserId'] = request.thirdPartyUserId;
  }
  if (!Util.isUnset(request.useAnonymousTbAccount)) {
    query['UseAnonymousTbAccount'] = request.useAnonymousTbAccount;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.addressInfo)) {
    body['AddressInfo'] = request.addressInfo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAddress',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request UpdateAddressRequest
 * @return UpdateAddressResponse
 */
async function updateAddress(request: UpdateAddressRequest): UpdateAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAddressWithOptions(request, runtime);
}

model ValidateTaobaoAccountRequest {
  bizId?: string(name='BizId', description='This parameter is required.', example='LMALL20******001'),
  bizUid?: string(name='BizUid', description='This parameter is required.', example='42******681'),
  extJson?: string(name='ExtJson', example='{}'),
  mobileNo?: string(name='MobileNo', example='181****0115'),
  tbUserNick?: string(name='TbUserNick'),
}

model ValidateTaobaoAccountResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  logsId?: string(name='LogsId'),
  message?: string(name='Message', example='SUCCESS'),
  model?: {
    match?: boolean(name='Match'),
  }(name='Model'),
  requestId?: string(name='RequestId', example='DAAA6391-3339-5333-9E4D-C71CD26A231F'),
  subCode?: string(name='SubCode', example='205'),
  subMessage?: string(name='SubMessage', example='1004'),
  success?: boolean(name='Success', example='true'),
  totalCount?: long(name='TotalCount', example='5'),
}

model ValidateTaobaoAccountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ValidateTaobaoAccountResponseBody(name='body'),
}

/**
 * @param request ValidateTaobaoAccountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ValidateTaobaoAccountResponse
 */
async function validateTaobaoAccountWithOptions(request: ValidateTaobaoAccountRequest, runtime: Util.RuntimeOptions): ValidateTaobaoAccountResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizId)) {
    query['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizUid)) {
    query['BizUid'] = request.bizUid;
  }
  if (!Util.isUnset(request.extJson)) {
    query['ExtJson'] = request.extJson;
  }
  if (!Util.isUnset(request.mobileNo)) {
    query['MobileNo'] = request.mobileNo;
  }
  if (!Util.isUnset(request.tbUserNick)) {
    query['TbUserNick'] = request.tbUserNick;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ValidateTaobaoAccount',
    version = '2018-01-16',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @param request ValidateTaobaoAccountRequest
 * @return ValidateTaobaoAccountResponse
 */
async function validateTaobaoAccount(request: ValidateTaobaoAccountRequest): ValidateTaobaoAccountResponse {
  var runtime = new Util.RuntimeOptions{};
  return validateTaobaoAccountWithOptions(request, runtime);
}

